19import Lomiri.Components 1.3
21import Dekko.Mail.API 1.0
22import Dekko.Mail.Settings 1.0
23import Dekko.Mail.Stores.Views 1.0
24import Dekko.Mail.Stores.Mail 1.0
25import Dekko.Mail.Stores.Accounts 1.0
27import Dekko.Lomiri.Components 1.0
33 property bool panelIsParent: true
34 readonly property bool showGroups: MailboxStore.standardFoldersModel.count &&
35 MailboxStore.smartFoldersModel.count &&
36 AccountStore.receiveAccountsModel.count
39 width: navDrawer.width
40 height: panelIsParent ? navDrawer.topListViewHandle.height : navDrawer.height
45 sourceComponent: Component {
53 contentHeight: col.height + units.gu(5)
54 interactive: col.height > parent.height
57 anchors {left: parent.left; right: parent.right; top: parent.top}
65 model: MailboxStore.standardFoldersModel
69 supportsDescendents:
true
71 if (model.index === 0) {
72 MessageActions.openFolder(folder.displayName, folder.descendentsKey)
74 MessageActions.openFolder(folder.displayName, folder.messageKey)
77 onSubFolderClicked: MessageActions.openFolder(name, key)
78 Component.onCompleted: {
79 if (model.index === 0 && !panelIsParent) {
80 ViewActions.delayCallWithArgs(MessageKeys.openFolder, {
81 folderName: folder.displayName,
82 folderKey: folder.descendentsKey
95 visible: PolicyManager.views.smartFoldersVisible
98 title: qsTr(
"Smart folders")
99 model: MailboxStore.smartFoldersModel
103 id: smartFolderDelegate
106 onClicked: MessageActions.openFolder(folder.displayName, folder.messageKey)
117 visible: PolicyManager.views.accountsVisible
120 title: qsTr(
"Folders")
121 model: AccountStore.receiveAccountsModel
125 height: dLayout.height
126 divider.visible:
false
127 onClicked: MessageActions.openAccountFolder(qtObject.name, qtObject.id)
130 color: Qt.rgba(0, 0, 0, 0.05)
131 visible: dLayout ? dLayout.title.text === ViewStore.selectedNavFolder :
false
136 title.text: qtObject.name
138 height: units.gu(2.5)
141 SlotsLayout.position: SlotsLayout.Leading
156 width: navDrawer.width
157 height: panelIsParent ? navDrawer.topListViewHandle.height : navDrawer.height
161 sourceComponent: Component {
173 width: navDrawer.width
174 height: panelIsParent ? navDrawer.topListViewHandle.height : navDrawer.height
178 sourceComponent: Component {
190 width: navDrawer.width
191 height: panelIsParent ? navDrawer.topListViewHandle.height : navDrawer.height
195 sourceComponent: Component {