Show the update icon only when updates are pending
This commit is contained in:
@@ -39,8 +39,12 @@ BarWidget {
|
|||||||
Process {
|
Process {
|
||||||
id: updateProc
|
id: updateProc
|
||||||
command: ["blob-update-available"]
|
command: ["blob-update-available"]
|
||||||
onExited: function(exitCode) {
|
stdout: StdioCollector {
|
||||||
root.updateAvailable = exitCode === 0
|
waitForEnd: true
|
||||||
|
onStreamFinished: {
|
||||||
|
const pending = parseInt(String(text).trim(), 10)
|
||||||
|
root.updateAvailable = !isNaN(pending) && pending > 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user