Example #1
0
        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;
            }
        }
Example #2
0
        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);
        }