public void LoadRecentlyUsedItems() { HomepageItems.Clear(); var recentlyUsedItemList = PBData.GetSecureItemsByItemType(SecurityItemsDefaultProperties.SecurityItemType_PasswordVault, SecureItemOrderEnum.LastAccess); foreach (var item in recentlyUsedItemList) { HomepageItems.Add(new SecureBrowserItem(item)); if (HomepageItems.Count() == 24) { break; } } HomepageModel = new PageableViewModel <SecureItem>(HomepageItems); }
public void LoadFavoriteItems() { HomepageItems.Clear(); var favoriteSecureItemsList = PBData.GetSecureItemsByItemType(SecurityItemsDefaultProperties.SecurityItemType_PasswordVault).Where(x => x.Favorite).ToList(); if (favoriteSecureItemsList.Count == 0) { LoadRecentlyUsedItems(); } foreach (var favoriteItem in favoriteSecureItemsList) { HomepageItems.Add(new SecureBrowserItem(favoriteItem)); if (HomepageItems.Count() == 24) { break; } } HomepageModel = new PageableViewModel <SecureItem>(HomepageItems); }