From 42da08df20161bc533a9175fa974ed20ac3939df Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 30 Aug 2022 11:54:25 -0700 Subject: [PATCH] mobile: enable sharing via email 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 --- mobile-widgets/qml/Export.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml index 9d48dcaec0..a565e5efe3 100644 --- a/mobile-widgets/qml/Export.qml +++ b/mobile-widgets/qml/Export.qml @@ -137,7 +137,6 @@ TemplatePage { TemplateRadioButton { text: qsTr("Export Subsurface XML") - visible: Qt.platform.os !== "android" checked: true onClicked: { selectedExport = ExportType.EX_DIVES_XML @@ -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.") @@ -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() } } }