From 76e81e5d5387bda41717c23f4a54f6d6370599c2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 6 Aug 2018 18:37:47 -0700 Subject: QML UI: create separate function to show download page Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index af7537064..54f657a30 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -405,14 +405,18 @@ Kirigami.ScrollablePage { } } + function showDownloadPage() { + downloadFromDc.dcImportModel.clearTable() + stackView.push(downloadFromDc) + } + property QtObject downloadFromDCAction: Kirigami.Action { icon { name: ":/icons/downloadDC" color: subsurfaceTheme.primaryColor } onTriggered: { - downloadFromDc.dcImportModel.clearTable() - stackView.push(downloadFromDc) + showDownloadPage() } } -- cgit v1.2.3-70-g09d2