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