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); } }