IsRemovable = ApplicationManagerUtils.GetAppInfoRemovable(item.Key),
// TODO : Fill these correctly by using Tizen Device APIs
Installed = DateUtils.GetRandomDate(),
- LastUsed = DateUtils.GetRandomDate(),
};
appShortcutInfo.StateDescriptions.Add("default", defaultStateDescription);
return left.Installed.CompareTo(right.Installed) * -1;
}
- /// <summary>
- /// A method compares two last used dates of AppShortcutInfo
- /// Sorts AppShortcutInfo by last used date in descending
- /// </summary>
- /// <param name="left">A AppShortcutInfo to be compared with right</param>
- /// <param name="right">A AppShortcutInfo to be compared with left</param>
- /// <returns>
- /// If left precedes right, return greater than 0.
- /// If left follows right, return lesser than 0.
- /// </returns>
- /// <see cref="System.DateTime.CompareTo(System.DateTime)"/>
- private static int SortByRecentlyUsed(AppShortcutInfo left, AppShortcutInfo right)
- {
- return left.LastUsed.CompareTo(right.LastUsed) * -1;
- }
-
/// <summary>
/// A method sorts list by parameter
/// </summary>
DebuggingUtils.Dbg("GetSortedAppsList, option = " + sortOption.ToString());
switch (sortOption)
{
- case SortingOptions.RecentlyInstalled:
+ case SortingOptions.Newest:
list.Sort(SortByRecentlyInstalled);
break;
- case SortingOptions.RecentlyUsed:
- list.Sort(SortByRecentlyUsed);
- break;
case SortingOptions.Descending:
list.Sort(SortByLabelDescending);
break;
private void CreateSortButton()
{
- List<string> SortList = new List<string> { "Recentely Installed", "Recently Used", "A - Z", "Z - A" };
+ List<string> SortList = new List<string> { "Newest", "A - Z", "Z - A" };
SortButton = new DropdownList();
SortButton.ItemsSource = SortList;