From 7b2ffadf9cc86b4b383002375746d02ae9eb4d8d Mon Sep 17 00:00:00 2001 From: BookerLiu Date: Fri, 7 Mar 2025 11:29:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E8=87=AA=E5=8A=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Util/CommonCode.cs | 4 ++-- Util/ProcessUtil.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Util/CommonCode.cs b/Util/CommonCode.cs index b6f2d47..f6ddbff 100644 --- a/Util/CommonCode.cs +++ b/Util/CommonCode.cs @@ -349,11 +349,11 @@ namespace GeekDesk.Util /// /// 排序图标 /// - 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 menuList = MainWindow.appData.MenuList; //List list = new List(menuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList); diff --git a/Util/ProcessUtil.cs b/Util/ProcessUtil.cs index c7b7c4e..25c3489 100644 --- a/Util/ProcessUtil.cs +++ b/Util/ProcessUtil.cs @@ -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); }); }