refactor(A2): extract shared EmailTile widget #33

Merged
guettlibot merged 1 commits from task/a2-email-tile into main 2026-05-14 03:20:14 +00:00
guettlibot commented 2026-05-14 03:13:30 +00:00 (Migrated from codeberg.org)

Summary

  • Creates lib/ui/widgets/email_tile.dart — a reusable EmailTile widget that renders a flat email list tile (mail icon, bold-if-unread sender, subject, optional date trailing, optional location subtitle)
  • Replaces the private _EmailTile class in search_screen.dart with EmailTile(showLocation: true, ...)
  • Replaces the inlined ListTile in email_list_screen._buildEmailList() (the search results overlay) with EmailTile
  • Selection-mode checkboxes are passed via the leading override parameter, keeping the widget stateless and the selection logic in the screen

Test plan

  • task check-fast passes (dart format + analyze + 285 tests green)
  • Existing widget tests for SearchScreen and EmailListScreen (search-result navigation) still pass
## Summary - Creates `lib/ui/widgets/email_tile.dart` — a reusable `EmailTile` widget that renders a flat email list tile (mail icon, bold-if-unread sender, subject, optional date trailing, optional location subtitle) - Replaces the private `_EmailTile` class in `search_screen.dart` with `EmailTile(showLocation: true, ...)` - Replaces the inlined `ListTile` in `email_list_screen._buildEmailList()` (the search results overlay) with `EmailTile` - Selection-mode checkboxes are passed via the `leading` override parameter, keeping the widget stateless and the selection logic in the screen ## Test plan - [x] `task check-fast` passes (dart format + analyze + 285 tests green) - [x] Existing widget tests for SearchScreen and EmailListScreen (search-result navigation) still pass
Sign in to join this conversation.