Order radio station metadata fields in inspect view

This commit is contained in:
Jage9
2026-02-25 00:59:19 -05:00
parent 9eaa330c3e
commit 6fa588c684
2 changed files with 11 additions and 1 deletions

View File

@@ -196,6 +196,16 @@ export function getInspectItemPropertyKeys(item: WorldItem): string[] {
allKeys.push(key);
}
// Keep derived radio metadata in a stable, user-friendly order.
if (item.type === 'radio_station') {
for (const key of ['stationName', 'nowPlaying']) {
if (!isItemPropertyVisible(item, key)) continue;
if (seen.has(key)) continue;
seen.add(key);
allKeys.push(key);
}
}
const paramKeys = Object.keys(item.params).sort((a, b) => a.localeCompare(b));
for (const key of paramKeys) {
if (!isItemPropertyVisible(item, key)) continue;