private BlogPost GetFeatureItem() { var featureItem = RecentItems.FirstOrDefault(p => !string.IsNullOrWhiteSpace(p.Image)); if (featureItem == null) { featureItem = RecentItems[0]; } return(featureItem); }
private async Task LoadRecentItems() { var response = await _cacheService.GetRecentItemsFromCache(); if (RecentItems.IsNullOrEmpty()) { RecentItems = new ObservableCollection <ReaderItem>(response.ReaderItems); return; } foreach (var item in response.ReaderItems) { var existingItem = RecentItems.FirstOrDefault(x => x.Id == item.Id); if (existingItem != null) { item.CopyItem(existingItem); } else { RecentItems.Add(item); } } }
private BlogPost GetFeatureItem() { return(RecentItems.FirstOrDefault(p => !string.IsNullOrWhiteSpace(p.Image))); }