aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/mail/MailModule.qml
blob: 99ddaff6f5529bf5ea2537f07efc78b94f505fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

import QtQuick
import "../.."

// Always active: the unread count outlives the drawer, and Accounts watches
// qtmaildir.conf so a new account appears without a restart.
Module {
    id: mod

    name: "mail"
    icon: ""
    label: "Mail"
    alwaysActive: true

    tileContent: Component { MailTile {} }

    page: Component {
        Page {
            id: mailPage
            title: "Mail"
            // Mail has almost certainly arrived since this was last opened,
            // and for an autostarted shell that is the whole session.
            Component.onCompleted: Accounts.refresh()
            MailPage {
                width: parent.width
                onClose: mailPage.back()
            }
        }
    }
}