fix: update infos after app was launched
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
parent
733c9103b3
commit
74931e3d1a
@ -237,7 +237,7 @@ void ApplicationManager1Service::scanApplications() noexcept
|
|||||||
const auto &desktopFileDirs = getDesktopFileDirs();
|
const auto &desktopFileDirs = getDesktopFileDirs();
|
||||||
|
|
||||||
applyIteratively(
|
applyIteratively(
|
||||||
QList<QDir>(desktopFileDirs.cbegin(), desktopFileDirs.cend()),
|
QList<QDir>(desktopFileDirs.crbegin(), desktopFileDirs.crend()),
|
||||||
[this](const QFileInfo &info) -> bool {
|
[this](const QFileInfo &info) -> bool {
|
||||||
ParserError err{ParserError::NoError};
|
ParserError err{ParserError::NoError};
|
||||||
auto ret = DesktopFile::searchDesktopFileByPath(info.absoluteFilePath(), err);
|
auto ret = DesktopFile::searchDesktopFileByPath(info.absoluteFilePath(), err);
|
||||||
|
@ -993,10 +993,11 @@ void ApplicationService::updateAfterLaunch(bool isLaunch) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto timestamp = QDateTime::currentMSecsSinceEpoch();
|
auto timestamp = QDateTime::currentMSecsSinceEpoch();
|
||||||
|
|
||||||
if (auto ptr = m_storage.lock(); ptr) {
|
if (auto ptr = m_storage.lock(); ptr) {
|
||||||
|
m_lastLaunch = timestamp;
|
||||||
ptr->updateApplicationValue(
|
ptr->updateApplicationValue(
|
||||||
m_desktopSource.desktopId(), ApplicationPropertiesGroup, ::LastLaunchedTime, QVariant::fromValue(timestamp));
|
m_desktopSource.desktopId(), ApplicationPropertiesGroup, ::LastLaunchedTime, QVariant::fromValue(timestamp));
|
||||||
|
emit lastLaunchedTimeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user