Commit babef2d1 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

updates: only show the restart button when we're on the "reboot" state

Otherwise we get a weird floaty restart button during the updates are
still in progress.
parent d845d7c4
...@@ -185,9 +185,10 @@ DiscoverPage ...@@ -185,9 +185,10 @@ DiscoverPage
level: 3 level: 3
} }
Button { Button {
id: restartButton
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: i18n("Restart") text: i18n("Restart")
visible: resourcesUpdatesModel.needsReboot visible: false
onClicked: app.reboot() onClicked: app.reboot()
} }
Item { Item {
...@@ -362,6 +363,7 @@ DiscoverPage ...@@ -362,6 +363,7 @@ DiscoverPage
name: "reboot" name: "reboot"
PropertyChanges { target: page; footerLabel: i18nc("@info", "The system requires a restart to apply updates") } PropertyChanges { target: page; footerLabel: i18nc("@info", "The system requires a restart to apply updates") }
PropertyChanges { target: statusLabel; enabled: true } PropertyChanges { target: statusLabel; enabled: true }
PropertyChanges { target: restartButton; visible: true }
}, },
State { State {
name: "now-uptodate" name: "now-uptodate"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment