PCM: sort installed packages by date

This commit is contained in:
qu1ck 2022-01-03 04:14:17 +00:00 committed by Seth Hillbrand
parent 367431f825
commit 721403eb0e
1 changed files with 8 additions and 0 deletions

View File

@ -706,6 +706,14 @@ const std::vector<PCM_INSTALLATION_ENTRY> PLUGIN_CONTENT_MANAGER::GetInstalledPa
v.push_back( entry.second );
} );
std::sort( v.begin(), v.end(),
[]( const PCM_INSTALLATION_ENTRY& a, const PCM_INSTALLATION_ENTRY& b )
{
return ( a.install_timestamp < b.install_timestamp )
|| ( a.install_timestamp == b.install_timestamp
&& a.package.identifier < b.package.identifier );
} );
return v;
}