Add user preference to control what happens after performing an action (delete, archive, move, snooze, mark as unread) in the single mail view. The default is to show the next message in the mailbox; users can opt to return to the mailbox instead. - New AfterMailViewAction enum (nextMessage, showMailbox) - DB schema v36: after_mail_view_action column on user_preferences - UserPreferences model, repository interface and impl updated - EmailDetailScreen: reads preference, finds next email before action, navigates via context.go() or context.pop() accordingly - UserPreferencesScreen: new "After mail action" section with radio group - Tests updated: FakeUserPreferencesRepository, migration test, new UserPreferencesScreen tests with scroll-to-reveal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
441 B
Dart
15 lines
441 B
Dart
enum MenuPosition { bottom, top }
|
|
|
|
enum AfterMailViewAction { nextMessage, showMailbox }
|
|
|
|
class UserPreferences {
|
|
const UserPreferences({
|
|
this.menuPosition = MenuPosition.bottom,
|
|
this.mailViewButtonPosition = MenuPosition.bottom,
|
|
this.afterMailViewAction = AfterMailViewAction.nextMessage,
|
|
});
|
|
final MenuPosition menuPosition;
|
|
final MenuPosition mailViewButtonPosition;
|
|
final AfterMailViewAction afterMailViewAction;
|
|
}
|