observeThreads and observeEmails previously returned every row with
no limit, streaming thousands of emails into memory as the mailbox grew.
Changes:
lib/core/repositories/email_repository.dart: add {int limit = 50}
named param to observeEmails and observeThreads.
lib/data/repositories/email_repository_impl.dart: pass ..limit(limit)
to the Drift select statement in both methods.
lib/ui/screens/email_list_screen.dart: add _limit = 50 state
(increments by 50 via "Load more" button); _buildThreadList shows a TextButton('Load more') as the last row when threads.length == _limit.
Test fakes/mocks updated to match the new signature.
Implements P2 from the improvement plan.
`observeThreads` and `observeEmails` previously returned every row with
no limit, streaming thousands of emails into memory as the mailbox grew.
**Changes:**
- `lib/core/repositories/email_repository.dart`: add `{int limit = 50}`
named param to `observeEmails` and `observeThreads`.
- `lib/data/repositories/email_repository_impl.dart`: pass `..limit(limit)`
to the Drift select statement in both methods.
- `lib/ui/screens/email_list_screen.dart`: add `_limit = 50` state
(increments by 50 via "Load more" button); `_buildThreadList` shows a
`TextButton('Load more')` as the last row when `threads.length == _limit`.
- Test fakes/mocks updated to match the new signature.
Closes #19 (P2)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements P2 from the improvement plan.
observeThreadsandobserveEmailspreviously returned every row withno limit, streaming thousands of emails into memory as the mailbox grew.
Changes:
lib/core/repositories/email_repository.dart: add{int limit = 50}named param to
observeEmailsandobserveThreads.lib/data/repositories/email_repository_impl.dart: pass..limit(limit)to the Drift select statement in both methods.
lib/ui/screens/email_list_screen.dart: add_limit = 50state(increments by 50 via "Load more" button);
_buildThreadListshows aTextButton('Load more')as the last row whenthreads.length == _limit.Closes #19 (P2)