feat(mail): return to the list after marking an open message unread
Gmail-style: marking the currently-open message unread returns to the message list instead of staying in the reading pane (where the viewer's auto-mark-read would just flip it back to read). Gated on the returnToListAfterAction setting added in #477 (default on); when off, you stay in the viewer. Only the single-message viewer, and only on mark-unread (read === false).
This commit is contained in:
@@ -3118,6 +3118,12 @@ export default function Home() {
|
||||
onMarkAsRead={async (emailId, read) => {
|
||||
if (client) {
|
||||
await markAsRead(client, emailId, read);
|
||||
// Marking the open message unread returns to the list
|
||||
// (Gmail-style, gated on returnToListAfterAction). Staying
|
||||
// in the reading pane would just re-mark it read on view.
|
||||
if (!read && useSettingsStore.getState().returnToListAfterAction) {
|
||||
handleMobileBack();
|
||||
}
|
||||
}
|
||||
}}
|
||||
onDownloadAttachment={handleDownloadAttachment}
|
||||
|
||||
Reference in New Issue
Block a user