fix: preserve bandplan override lookup
This commit is contained in:
@@ -56,16 +56,16 @@
|
||||
}
|
||||
|
||||
// src/core/settings.ts
|
||||
var STORAGE_PREFIX2 = "trx_";
|
||||
var STORAGE_PREFIX = "trx_";
|
||||
function saveSetting(key, value) {
|
||||
try {
|
||||
localStorage.setItem(`${STORAGE_PREFIX2}${key}`, JSON.stringify(value));
|
||||
localStorage.setItem(`${STORAGE_PREFIX}${key}`, JSON.stringify(value));
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
function loadSetting(key, fallback) {
|
||||
try {
|
||||
const value = localStorage.getItem(`${STORAGE_PREFIX2}${key}`);
|
||||
const value = localStorage.getItem(`${STORAGE_PREFIX}${key}`);
|
||||
return value === null ? fallback : JSON.parse(value);
|
||||
} catch {
|
||||
return fallback;
|
||||
@@ -3113,7 +3113,7 @@ ${unsupportedBandSummary()}`;
|
||||
}
|
||||
if (!_bandplanServerDefaultApplied && typeof update.bandplan_enabled === "boolean" && typeof update.bandplan_region === "string") {
|
||||
_bandplanServerDefaultApplied = true;
|
||||
const hasUserOverride = localStorage.getItem(STORAGE_PREFIX + "bandplanRegion") !== null;
|
||||
const hasUserOverride = localStorage.getItem("trx_bandplanRegion") !== null;
|
||||
if (!hasUserOverride) {
|
||||
const region = update.bandplan_enabled ? update.bandplan_region : "off";
|
||||
bandplanRegion = region;
|
||||
|
||||
Reference in New Issue
Block a user