mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: simple message and busy spinner while storing downloaded dives
Due to some recent changes processing the downloaded dives and re-displaying the dive list can take quite a while. So show a small message and the busy spinner to warn the user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
84920fd657
commit
9b6ec64853
1 changed files with 11 additions and 1 deletions
|
@ -366,7 +366,12 @@ Kirigami.Page {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
text: qsTr("Please wait while we record these dives...")
|
||||
Layout.fillWidth: true
|
||||
visible: acceptButton.busy
|
||||
leftPadding: Kirigami.Units.gridUnit * 3 // trust me - that looks better
|
||||
}
|
||||
RowLayout {
|
||||
id: bottomButtons
|
||||
Controls.Label {
|
||||
|
@ -375,10 +380,13 @@ Kirigami.Page {
|
|||
}
|
||||
SsrfButton {
|
||||
id: acceptButton
|
||||
property bool busy: false
|
||||
enabled: divesDownloaded
|
||||
text: qsTr("Accept")
|
||||
bottomPadding: Kirigami.Units.gridUnit / 2
|
||||
onClicked: {
|
||||
busy = true
|
||||
rootItem.showBusy()
|
||||
manager.appendTextToLog("Save downloaded dives that were selected")
|
||||
importModel.recordDives()
|
||||
manager.saveChangesLocal()
|
||||
|
@ -386,6 +394,8 @@ Kirigami.Page {
|
|||
manager.refreshDiveList()
|
||||
pageStack.pop();
|
||||
download.text = qsTr("Download")
|
||||
busy = false
|
||||
rootItem.hideBusy()
|
||||
divesDownloaded = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue