Dekko
Loading...
Searching...
No Matches
SyncState.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18import QtQuick 2.4
19import QtQml.StateMachine 1.0 as DSM
20import Lomiri.Components.Popups 1.3
21import QuickFlux 1.0
22import Dekko.Mail.API 1.0
23import Dekko.Mail.Stores.Accounts 1.0
25DSM.State {
26 id: syncState
27
28 property alias nextTargetState: next.targetState
29
30 onEntered: {
31 Log.logStatus("SyncState::onEntered", "Loading sync overlay");
32 d.overlay = PopupUtils.open(Qt.resolvedUrl("../components/ProcessingOverlay.qml"),
33 wizard,
34 {
35 text: qsTr("Synchronizing account.")
36 })
37 WizardActions.syncNewAccount()
38 }
39
40 onExited: {
41 Log.logStatus("SyncState::onExited", "Destroying sync overlay");
42 MessageActions.resetFolderLists()
43 if (d.overlay !== undefined) {
44 PopupUtils.close(d.overlay)
45 }
46 }
47
48 DSM.SignalTransition {
49 id: next
50 signal: AccountSetup.goNext
51 }
52
53 QtObject {
54 id: d
55 property var overlay: undefined
56 }
57}