🐛 修复不能实时自动排序
This commit is contained in:
@@ -349,11 +349,11 @@ namespace GeekDesk.Util
|
||||
/// <summary>
|
||||
/// 排序图标
|
||||
/// </summary>
|
||||
public static void SortIconList()
|
||||
public static void SortIconList(bool sort = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM)
|
||||
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM && sort)
|
||||
{
|
||||
ObservableCollection<MenuInfo> menuList = MainWindow.appData.MenuList;
|
||||
//List<IconInfo> list = new List<IconInfo>(menuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList);
|
||||
|
||||
@@ -161,6 +161,9 @@ namespace GeekDesk.Util
|
||||
LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type);
|
||||
}
|
||||
}
|
||||
|
||||
//启动后根据是否开启了使用次数排序判断是否执行一次排序
|
||||
CommonCode.SortIconList(MainWindow.appData.AppConfig.IconSortType == (SortType.COUNT_LOW|SortType.COUNT_UP) ? true : false);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user