timestamp sorting

This commit is contained in:
Aaron Greenspan
2021-01-13 18:02:00 -07:00
committed by Aiden McClelland
parent 90b412384a
commit d7508345eb
3 changed files with 10 additions and 2 deletions

View File

@@ -74,7 +74,9 @@ export class AppAvailableListPage {
async getApps (): Promise<void> {
try {
this.apps = await this.apiService.getAvailableApps().then(apps =>
apps.map(a => ({ id: a.id, subject: initPropertySubject(a) })),
apps
.sort( (a1, a2) => a2.latestVersionTimestamp.getTime() - a1.latestVersionTimestamp.getTime())
.map(a => ({ id: a.id, subject: initPropertySubject(a) })),
)
this.appModel.getContents().forEach(appInstalled => this.mergeInstalledProps(appInstalled.id))
} catch (e) {