From c296e07e219d4e9c4229ea4a8b6b1f7c6fcca6cd Mon Sep 17 00:00:00 2001 From: youdiansaodongxi Date: Mon, 29 Apr 2024 11:07:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E3=80=90=E6=AC=A1=E8=A6=81=E3=80=91?= =?UTF-8?q?=E3=80=90=E9=9C=80=E6=B1=8225776=E3=80=91=E3=80=90=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E8=8F=9C=E5=8D=95=E3=80=91=E4=BB=8E=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=88=97=E8=A1=A8=E4=B8=AD=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E7=9A=84=E5=BA=94=E7=94=A8=EF=BC=8C=E5=8F=96=E6=B6=88=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=BF=98=E4=BC=9A=E5=87=BA=E7=8E=B0=E5=9C=A8=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E5=AE=89=E8=A3=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/extension/favorite/favorite-context-menu.cpp | 1 + src/libappdata/app-database-interface.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/extension/favorite/favorite-context-menu.cpp b/src/extension/favorite/favorite-context-menu.cpp index fa04d2b..ba95d57 100644 --- a/src/extension/favorite/favorite-context-menu.cpp +++ b/src/extension/favorite/favorite-context-menu.cpp @@ -55,6 +55,7 @@ FavoriteContextMenu::actions(const DataEntity &data, QMenu *parent, const MenuIn list << new QAction(QObject::tr("Fix to favorite"), parent); QObject::connect(list.last(), &QAction::triggered, parent, [data] { FavoritesModel::instance().addAppToFavorites(data.id()); + BasicAppModel::instance()->databaseInterface()->updateApLaunchedState(data.id(), true); //BasicAppModel::instance()->databaseInterface()->fixAppToFavorite(data.id(), 1); EventTrack::instance()->sendDefaultEvent("fix_to_favorite", "Right-click Menu"); }); diff --git a/src/libappdata/app-database-interface.cpp b/src/libappdata/app-database-interface.cpp index 6526f59..11c0315 100644 --- a/src/libappdata/app-database-interface.cpp +++ b/src/libappdata/app-database-interface.cpp @@ -80,6 +80,7 @@ AppDatabaseWorkerPrivate::AppDatabaseWorkerPrivate(AppDatabaseInterface *parent) // 默认收藏应用 for (const auto &appid : GlobalSetting::instance()->defaultFavoriteApps()) { appDatabase->setAppToFavorites(appid); + appDatabase->setAppLaunchedState(appid, true); } }