Skip to content

Commit

Permalink
mobile: enable sharing via email
Browse files Browse the repository at this point in the history
Instead of using the save file dialog (which creates a horrendous user
experience - and isn't even supported on Android), simply allow the user
to email the file in question to a recipient of their choice, e.g.,
themselves.

Signed-off-by: Dirk Hohndel <[email protected]>
  • Loading branch information
dirkhh committed Aug 31, 2022
1 parent f144fa0 commit 42da08d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mobile-widgets/qml/Export.qml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ TemplatePage {

TemplateRadioButton {
text: qsTr("Export Subsurface XML")
visible: Qt.platform.os !== "android"
checked: true
onClicked: {
selectedExport = ExportType.EX_DIVES_XML
Expand All @@ -146,7 +145,6 @@ TemplatePage {
}
TemplateRadioButton {
text: qsTr("Export Subsurface dive sites XML")
visible: Qt.platform.os !== "android"
onClicked: {
selectedExport = ExportType.EX_DIVE_SITES_XML
explain.text = qsTr("Subsurface dive sites native XML format.")
Expand Down Expand Up @@ -209,8 +207,12 @@ TemplatePage {
exportSelection.visible = false
textPassword.visible = false
uploadDialog.visible = true
} else if (Qt.platform.os !== "android") {
} else if (Qt.platform.os !== "android" && Qt.platform.os !== "ios") {
saveAsDialog.open()
} else {
manager.appendTextToLog("Send export of type " + selectedExport + " via email.")
manager.shareViaEmail(selectedExport, anonymize.checked)
pageStack.pop()
}
}
}
Expand Down

0 comments on commit 42da08d

Please sign in to comment.