private async Task UpdateNextRowsCommand() { if (IsBusy) { return; } pageId++; IsBusy = true; RefreshCommand.ChangeCanExecute(); string url = Url + "&page=" + pageId; ObservableCollection <RowData> rows = await WebManager.LoadItemsAsync(url); Rows.RemoveAt(Rows.Count - 1); foreach (RowData rowData in rows) { Rows.Add(rowData); } Rows = RemoveDuplicateRows(Rows); Rows.Add(GetMoreRowData()); IsBusy = false; RefreshCommand.ChangeCanExecute(); }
private async Task UpdateRowsCommand() { if (string.IsNullOrEmpty(Url)) { return; } if (IsBusy) { return; } pageId = 1; IsBusy = true; RefreshCommand.ChangeCanExecute(); var rows = await WebManager.LoadItemsAsync(Url); Rows = RemoveDuplicateRows(rows); Rows.Add(GetMoreRowData()); IsBusy = false; RefreshCommand.ChangeCanExecute(); }