feat(settings): make return-to-list-after-action configurable (default on)
Per review: gate the return-to-list behaviour behind a setting, returnToListAfterAction, defaulting to true (the Gmail/Yahoo default). When off, deleting the open message keeps the previous auto-advance-to-next behaviour. Adds the setting to the store (persisted), a toggle under Reading settings, and i18n keys across all locales (English; non-English need translation). The same setting will govern mark-as-unread (#468).
This commit is contained in:
@@ -3101,11 +3101,13 @@ export default function Home() {
|
||||
onForward={handleForward}
|
||||
onDelete={() => {
|
||||
// Deleting the open message returns to the list (Gmail-style),
|
||||
// not the next email. Deselect first so the store's
|
||||
// remove-and-advance sees no selection and doesn't auto-open
|
||||
// the next message; then delete the captured email.
|
||||
// not the next email — unless the user turned the setting off.
|
||||
// Deselect first so the store's remove-and-advance sees no
|
||||
// selection and doesn't auto-open the next message.
|
||||
const target = selectedEmail;
|
||||
handleMobileBack();
|
||||
if (useSettingsStore.getState().returnToListAfterAction) {
|
||||
handleMobileBack();
|
||||
}
|
||||
handleDelete(target);
|
||||
}}
|
||||
onArchive={() => handleArchive()}
|
||||
|
||||
Reference in New Issue
Block a user