fix:【次要】【需求25776】【开始菜单】从最新安装列表中收藏的应用,取消后,还会出现在最新安装中
This commit is contained in:
parent
708e5bde7a
commit
c296e07e21
|
@ -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");
|
||||
});
|
||||
|
|
|
@ -80,6 +80,7 @@ AppDatabaseWorkerPrivate::AppDatabaseWorkerPrivate(AppDatabaseInterface *parent)
|
|||
// 默认收藏应用
|
||||
for (const auto &appid : GlobalSetting::instance()->defaultFavoriteApps()) {
|
||||
appDatabase->setAppToFavorites(appid);
|
||||
appDatabase->setAppLaunchedState(appid, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue