fix:【次要】【需求25776】【开始菜单】从最新安装列表中收藏的应用,取消后,还会出现在最新安装中

This commit is contained in:
youdiansaodongxi 2024-04-29 11:07:10 +08:00 committed by iaom
parent 708e5bde7a
commit c296e07e21
2 changed files with 2 additions and 0 deletions

View File

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

View File

@ -80,6 +80,7 @@ AppDatabaseWorkerPrivate::AppDatabaseWorkerPrivate(AppDatabaseInterface *parent)
// 默认收藏应用
for (const auto &appid : GlobalSetting::instance()->defaultFavoriteApps()) {
appDatabase->setAppToFavorites(appid);
appDatabase->setAppLaunchedState(appid, true);
}
}