public async Task Refresh() { if (!IsInternetAvailable()) { await DialogService.ShowDialogASync("What is better ? To be born good or to overcome your evil nature through great effort ?", "No Internet Connection!"); return; } Messenger.Publish(new LoadingStatusMessage(this) { IsLoadingIndicatorActive = true }); try { if (_repositoryId.HasValue) { Messenger.Publish(new AppBarHeaderChangeMessage(this) { HeaderTitle = "Notifications" }); Notifications = await _notificationDataService.GetAllNotificationsForRepository(_repositoryId.Value, GithubClientService.GetAuthorizedGithubClient()); } else { Messenger.Publish(new AppBarHeaderChangeMessage(this) { HeaderTitle = "Your Notifications" }); Notifications = await _notificationDataService.GetAllNotificationsForCurrentUser( GithubClientService.GetAuthorizedGithubClient()); } } catch (HttpRequestException) { await DialogService.ShowDialogASync("The internet seems to be working but the code threw an HttpRequestException. Try again.", "Hmm, this is weird!"); } Messenger.Publish(new LoadingStatusMessage(this) { IsLoadingIndicatorActive = false }); }