public async Task LoadSearchHistoryAsync() { var ctx = new RisDbContext(); var history = await ctx.GetSearchHistoryEntries(); SelectedSearchHistory = null; SearchHistory = history; if (null != _selectedSearchHistoryItemFromState && history != null) { SelectedSearchHistory = history.FirstOrDefault(h => h.Id == _selectedSearchHistoryItemFromState.Value); } if (history.Any()) { MessengerHelper.Notify(MessengerHelper.DbLoadCompleted); } }
public async Task LoadDownloadsAsync() { var ctx = new RisDbContext(); var localCopies = await ctx.GetDownloads(); SelectedDownload = null; DownloadedDocuments = localCopies; if (null != _selectedDownloadFromState && localCopies != null) { SelectedDownload = localCopies.FirstOrDefault(h => h.Id == _selectedDownloadFromState.Value); } if (localCopies.Any()) { MessengerHelper.Notify(MessengerHelper.DbLoadCompleted); } }
//No parameters static public void Notify(string eventType) { messengerHelper.Notify(eventType); }