From 92c278f8440d9a4e08c0019c5c9452da6fb97aaf Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 26 Feb 2025 17:20:16 +1100 Subject: updates: sort updates by name --- src/services/updates.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/services') diff --git a/src/services/updates.ts b/src/services/updates.ts index dc82080..8477733 100644 --- a/src/services/updates.ts +++ b/src/services/updates.ts @@ -146,6 +146,9 @@ export default class Updates extends GObject.Object { if (data.errors.length > 0 && data.repos.length === 0) { this.#updateFromCache().catch(console.error); } else { + // Sort updates by name + for (const repo of data.repos) repo.updates.sort((a, b) => a.name.localeCompare(b.name)); + // Cache and set writeFileAsync(this.#cachePath, JSON.stringify({ cached: true, ...data })).catch(console.error); this.#data = data; -- cgit v1.2.3-freya