Feature: pin emails to the top of the folder list

Outlook-Web-style pinning: a context-menu Pin/Unpin action stores a
$pinned keyword on the message (plain IMAP-compatible flag, survives
other clients), and pinned mails stay at the top of the folder list
regardless of age, marked with a pin icon.

Ordering is done server-side via the hasKeyword sort comparator
(RFC 8621), applied consistently to the folder fetch, pagination and
the push-refresh so page windows stay stable. The client-side safety
sort in getEmails mirrors it, and sortThreadGroups keeps threads
containing a pinned mail on top so the client-side thread grouping
does not undo the order.

The new-mail notification in refreshCurrentMailbox now checks the
first non-pinned entry: with pinned mails on top, the newest mail is
no longer at index 0 and arrivals would never have notified.

The toggle reuses the color-tag pathway (routed keyword write for
unified views, in-place local patch), then refetches the first page
so the mail floats or sinks immediately. Search and unified views
keep their existing order.

Pin/Unpin strings are added to all 21 locales.
This commit is contained in:
dealerweb
2026-07-06 13:36:25 +02:00
committed by Linus Rath
parent d7a64fd9d6
commit d384c3b553
33 changed files with 194 additions and 39 deletions
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Označit jako nepřečtené",
"star": "Označit hvězdičkou",
"unstar": "Odebrat hvězdičku",
"pin": "Připnout",
"unpin": "Odepnout",
"move_to": "Přesunout do...",
"archive": "Archivovat",
"delete": "Odstranit",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Markér som ulæst",
"star": "Stjernemarkér",
"unstar": "Fjern stjerne",
"pin": "Fastgør",
"unpin": "Frigør",
"move_to": "Flyt til...",
"archive": "Arkivér",
"delete": "Slet",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Als ungelesen markieren",
"star": "Stern hinzufügen",
"unstar": "Stern entfernen",
"pin": "Anheften",
"unpin": "Lösen",
"move_to": "Verschieben nach...",
"archive": "Archivieren",
"delete": "Löschen",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Mark as Unread",
"star": "Star",
"unstar": "Unstar",
"pin": "Pin",
"unpin": "Unpin",
"move_to": "Move to...",
"archive": "Archive",
"delete": "Delete",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Marcar como No Leído",
"star": "Destacar",
"unstar": "Quitar Destacado",
"pin": "Anclar",
"unpin": "Desanclar",
"move_to": "Mover a...",
"archive": "Archivar",
"delete": "Eliminar",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "علامت‌گذاری خوانده نشده",
"star": "ستاره‌دار",
"unstar": "حذف ستاره",
"pin": "سنجاق کردن",
"unpin": "برداشتن سنجاق",
"move_to": "انتقال به...",
"archive": "بایگانی",
"delete": "حذف",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Marquer comme non lu",
"star": "Marquer comme favori",
"unstar": "Retirer des favoris",
"pin": "Épingler",
"unpin": "Désépingler",
"move_to": "Déplacer vers...",
"archive": "Archiver",
"delete": "Supprimer",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Olvasatlannak jelölés",
"star": "Csillagozás",
"unstar": "Csillagozás megszüntetése",
"pin": "Rögzítés",
"unpin": "Rögzítés feloldása",
"move_to": "Áthelyezés ide...",
"archive": "Archiválás",
"delete": "Törlés",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Segna come non letto",
"star": "Aggiungi stella",
"unstar": "Rimuovi stella",
"pin": "Fissa",
"unpin": "Non fissare più",
"move_to": "Sposta in...",
"archive": "Archivia",
"delete": "Elimina",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "未読にする",
"star": "スターを付ける",
"unstar": "スターを外す",
"pin": "ピン留め",
"unpin": "ピン留めを外す",
"move_to": "移動...",
"archive": "アーカイブ",
"delete": "削除",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "읽지 않은 상태로 표시",
"star": "별표 달기",
"unstar": "별표 해제",
"pin": "고정",
"unpin": "고정 해제",
"move_to": "이동...",
"archive": "보관",
"delete": "삭제",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Atzīmēt kā nelasītu",
"star": "Pievienot zvaigznīti",
"unstar": "Noņemt zvaigznīti",
"pin": "Piespraust",
"unpin": "Atspraust",
"move_to": "Pārvietot uz...",
"archive": "Arhivēt",
"delete": "Dzēst",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Markeren als ongelezen",
"star": "Ster toevoegen",
"unstar": "Ster verwijderen",
"pin": "Vastmaken",
"unpin": "Losmaken",
"move_to": "Verplaatsen naar...",
"archive": "Archiveren",
"delete": "Verwijderen",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Oznacz jako nieprzeczytane",
"star": "Oznacz gwiazdką",
"unstar": "Usuń gwiazdkę",
"pin": "Przypnij",
"unpin": "Odepnij",
"move_to": "Przenieś do...",
"archive": "Archiwizuj",
"delete": "Usuń",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Marcar como Não Lido",
"star": "Adicionar Estrela",
"unstar": "Remover Estrela",
"pin": "Fixar",
"unpin": "Desafixar",
"move_to": "Mover para...",
"archive": "Arquivar",
"delete": "Excluir",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Marcați ca necitit",
"star": "Stea",
"unstar": "Anulează marcarea cu stea",
"pin": "Fixează",
"unpin": "Anulează fixarea",
"move_to": "Mergi la...",
"archive": "Arhivează",
"delete": "Șterge",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Отметить как непрочитанное",
"star": "Добавить звёздочку",
"unstar": "Убрать звёздочку",
"pin": "Закрепить",
"unpin": "Открепить",
"move_to": "Переместить в...",
"archive": "В архив",
"delete": "Удалить",
+2
View File
@@ -1943,6 +1943,8 @@
"mark_unread": "Označiť ako neprečítané",
"star": "Hviezdička",
"unstar": "Odstrániť hviezdičku",
"pin": "Pripnúť",
"unpin": "Odopnúť",
"move_to": "Presunúť do...",
"archive": "Archivovať",
"delete": "Odstrániť",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Okunmadı Olarak İşaretle",
"star": "Yıldız Ekle",
"unstar": "Yıldızı Kaldır",
"pin": "Sabitle",
"unpin": "Sabitlemeyi kaldır",
"move_to": "Şuraya taşı...",
"archive": "Arşivle",
"delete": "Sil",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "Позначити як непрочитане",
"star": "зірка",
"unstar": "Зняти зірочку",
"pin": "Закріпити",
"unpin": "Відкріпити",
"move_to": "Перейти до...",
"archive": "Архів",
"delete": "Видалити",
+2
View File
@@ -1954,6 +1954,8 @@
"mark_unread": "标记为未读",
"star": "加星标",
"unstar": "取消星标",
"pin": "固定",
"unpin": "取消固定",
"move_to": "移动到…",
"archive": "归档",
"delete": "删除",