feat: move-to-folder dialog, batch actions, reader source view, Focused/Other pivot
- MoveToFolderDialog: modal folder picker per account (excludes current) - Wire 'Mover a...' in reader ⋯ menu + batch move (emit -1 -> dialog) - Connect batch delete/mark-unread/flag handlers (were unconnected) - Reader: 'Ver codigo fuente' reads .eml via MimeStorageService::readEmlFile - Reader: 'Marcar como no leido' emits markUnreadRequested - Pivot Focused/Other: EmailListModel::setShowFocusedOnly heuristic (flagged/pinned/frequent senders), reset to Focused on inbox select
This commit is contained in:
+20
-10
@@ -660,9 +660,8 @@ void MailListView::onBatchMarkUnreadClicked()
|
||||
void MailListView::onBatchMoveClicked()
|
||||
{
|
||||
if (m_selectedMailIds.isEmpty()) return;
|
||||
// TODO: Show folder picker dialog
|
||||
// For now, just emit signal
|
||||
// emit batchMoveRequested(m_selectedMailIds, targetFolderId);
|
||||
// targetFolderId == -1 signals the UI layer to present a folder picker
|
||||
emit batchMoveRequested(m_selectedMailIds, -1);
|
||||
exitMultiSelectMode();
|
||||
}
|
||||
|
||||
@@ -678,19 +677,30 @@ void MailListView::setFolderType(const QString& folderType)
|
||||
m_pivotCombo->setVisible(folderType == "inbox");
|
||||
}
|
||||
|
||||
void MailListView::resetPivot()
|
||||
{
|
||||
// Default to Focused (index 0). blockSignals to avoid recursive refresh.
|
||||
m_pivotCombo->blockSignals(true);
|
||||
m_pivotCombo->setCurrentIndex(0);
|
||||
m_pivotCombo->blockSignals(false);
|
||||
if (m_sourceModel) {
|
||||
m_sourceModel->setShowFocusedOnly(true);
|
||||
m_sourceModel->refresh();
|
||||
}
|
||||
refreshViews();
|
||||
}
|
||||
|
||||
void MailListView::onPivotChanged(int index)
|
||||
{
|
||||
// 0 = Focused (Principal), 1 = Other (Otros)
|
||||
// TODO: Implement pivot filtering logic
|
||||
// For now, just update the model filter
|
||||
if (!m_sourceModel) return;
|
||||
|
||||
|
||||
if (index == 0) {
|
||||
// Focused: important emails (could be based on sender frequency, AI, etc.)
|
||||
// m_sourceModel->setShowFocusedOnly(true);
|
||||
// Focused: important emails (flagged, pinned, or frequent senders)
|
||||
m_sourceModel->setShowFocusedOnly(true);
|
||||
} else {
|
||||
// Other: promotional, notifications, etc.
|
||||
// m_sourceModel->setShowFocusedOnly(false);
|
||||
// Other: show everything (promotional, notifications, etc.)
|
||||
m_sourceModel->setShowFocusedOnly(false);
|
||||
}
|
||||
refreshViews();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user