Fix parseModuleJson undefined call in custom command modules
CustomCommandModule.update() in Bar.qml called root.parseModuleJson(raw)
but the function was removed in 3b970068 (the indicator split). Any
custom command module emitting waybar-style JSON would have crashed on
first poll.
Hoist the helper into Util so both call sites — the bar's custom command
module and BarIndicator.extractData — share one definition.
This commit is contained in:
@@ -751,7 +751,7 @@ Item {
|
||||
}
|
||||
|
||||
function update(raw) {
|
||||
var data = root.parseModuleJson(raw)
|
||||
var data = Util.parseModuleJson(raw)
|
||||
var klass = data.class || data.alt || ""
|
||||
|
||||
outputText = data.text || String(raw || "").trim()
|
||||
|
||||
Reference in New Issue
Block a user