QML UI: ensure actions are set up for Credentials page

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-04-03 10:48:35 -07:00
parent e4460be8a6
commit 8c94fa2676

View file

@ -215,8 +215,7 @@ Kirigami.ScrollablePage {
opacity: credentialStatus === QMLManager.NOCLOUD || (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL) ? 0 : 1 opacity: credentialStatus === QMLManager.NOCLOUD || (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL) ? 0 : 1
visible: opacity > 0 visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } } Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
onVisibleChanged: { function setupActions() {
print("startPage onVisibleChanged credentialStatus " + credentialStatus + " diveListView.count " + diveListView.count)
if (visible) { if (visible) {
page.actions.main = page.saveAction page.actions.main = page.saveAction
page.actions.right = page.offlineAction page.actions.right = page.offlineAction
@ -233,6 +232,12 @@ Kirigami.ScrollablePage {
title = qsTr("Dive list") title = qsTr("Dive list")
} }
} }
onVisibleChanged: {
setupActions();
}
Component.onCompleted: {
setupActions();
}
} }
Text { Text {