// Copyright (C) 2026 Danilo M. // // 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 // Accounts is a singleton; nothing names it at shell start otherwise, so // this reference instantiates it here. That is what makes alwaysActive // true mean something: the config FileView starts and the unread count is // fetched while the drawer is closed, as the old MailPanel did, rather // than first when the drawer opens. Component.onCompleted: Accounts.refresh() 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() } } } }