private async Task RefreshAsync() { IsBusy = true; try { await timelineService.LoadAsync(); } catch { await DialogService.AlertAsync("An error occurred while refreshing the timeline."); } finally { MessengerInstance.Send(new NotificationMessage(Constants.RefreshCompleted)); IsBusy = false; } }
public override async void Activate(object parameter) { IsBusy = true; if (!await userService.EnsureLoggedInAsync()) { return; } // Ensures user's information is notificated to the UI. RaisePropertyChanged(() => User); if (!timelineService.IsLoaded) { await timelineService.LoadAsync(); } IsBusy = false; base.Activate(parameter); }