From 607d8e956684d9a53a57a5e3a23d0f51be6aabb0 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 24 Nov 2025 18:43:08 +0000 Subject: [PATCH] settings: show updates at top if one available --- ts/modules/settings.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ts/modules/settings.ts b/ts/modules/settings.ts index ed0928b..a4ab749 100644 --- a/ts/modules/settings.ts +++ b/ts/modules/settings.ts @@ -1043,6 +1043,21 @@ export class settingsList { icon.classList.add("button", "~urge"); icon.innerHTML = ``; icon.onclick = () => window.updater.checkForUpdates(window.modals.updateInfo.show); + // Put us first + if ("order" in this._settings && this._settings.order) { + let i = -1; + for (let j = 0; j < this._settings.order.length; j++) { + const member = this._settings.order[j]; + if ("section" in member && member.section == "updates") { + i = j; + break; + } + } + if (i != -1) { + this._settings.order.splice(i, 1); + this._settings.order.unshift({ section: "updates" }); + } + } } this.addSection(section.section, section, icon); } else if (section.section == "matrix" && !window.matrixEnabled) {