diff options
| author | saturneric <[email protected]> | 2026-09-12 15:41:37 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-12 15:41:37 +0200 |
| commit | d83f09922639c93ce15909ad45574c742b9770aa (patch) | |
| tree | b9d7cb1a524ee2b3b4c8847ecbc5153ea554ab51 /src/m_email/EMailModule.cpp | |
| parent | feat(email): store mail passwords without opt-in (diff) | |
| download | modules-d83f09922639c93ce15909ad45574c742b9770aa.tar.gz modules-d83f09922639c93ce15909ad45574c742b9770aa.zip | |
fix(email): defer IMAP connections and release folders
- add an explicit Connect action instead of connecting on dialog open
- require stored passwords and direct users to Mail Account settings
- reset browsing state when switching accounts
- release listed and previously opened folders before reopening them
- cache folder metadata without retaining vmime folder objects
- move network import action from the workspace menu to Advanced
Diffstat (limited to 'src/m_email/EMailModule.cpp')
| -rw-r--r-- | src/m_email/EMailModule.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/m_email/EMailModule.cpp b/src/m_email/EMailModule.cpp index cae188b..3697b49 100644 --- a/src/m_email/EMailModule.cpp +++ b/src/m_email/EMailModule.cpp @@ -622,6 +622,14 @@ REGISTER_EVENT_HANDLER(MAINWINDOW_MENU_MOUNTED, [](const MEvent& event) -> int { CB_ERR(event, -1, "no import_key_menu found"); } + // Importing over the network is a different kind of act from opening a new + // editor, so it belongs in Advanced rather than beside "Mail Editor" in the + // workspace menu. + auto* advance_menu = GFUIGetGUIObjectAs<QMenu>(event["advance_menu"]); + if (advance_menu == nullptr) { + LOG_ERROR("advance_menu handle invalid or not QMenu"); + } + auto* workspace_menu = GFUIGetGUIObjectAs<QMenu>(event["file_workspace_menu"]); if (!workspace_menu) { @@ -643,7 +651,7 @@ REGISTER_EVENT_HANDLER(MAINWINDOW_MENU_MOUNTED, [](const MEvent& event) -> int { QMetaObject::invokeMethod( QApplication::instance(), - [&]() -> void { + [&, advance_menu]() -> void { QWidget* parent = qobject_cast<QWidget*>(static_cast<QObject*>(main_window)); auto* action = new QAction( @@ -698,7 +706,7 @@ REGISTER_EVENT_HANDLER(MAINWINDOW_MENU_MOUNTED, [](const MEvent& event) -> int { }); controller->show(); }); - workspace_menu->addAction(import_action); + if (advance_menu != nullptr) advance_menu->addAction(import_action); }, Qt::BlockingQueuedConnection); CB_SUCC(event); |
