mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
Logic updates to re-ordering topbar widgets
This commit is contained in:
@@ -497,7 +497,10 @@ Singleton {
|
||||
function updateListModel(listModel, order) {
|
||||
listModel.clear();
|
||||
for (var i = 0; i < order.length; i++) {
|
||||
listModel.append({"widgetId": order[i]});
|
||||
// Handle both old string format and new object format
|
||||
var widgetId = typeof order[i] === "string" ? order[i] : order[i].id;
|
||||
var enabled = typeof order[i] === "string" ? true : order[i].enabled;
|
||||
listModel.append({"widgetId": widgetId, "enabled": enabled});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user