Repository navigation
Paginate sleep records and compute weekly/monthly averages via SQL - #7
Conversation
…L averages - Add Room Paging 3 dependency and PagingSource query to SleepSessionDao - Expose Flow<PagingData<SleepSessionEntity>> in SleepRepository and SleepViewModel - Use collectAsLazyPagingItems in SleepTrackerScreen to paginate sleep records - Add getAverageDurationSince SQL query to SleepSessionDao for weekly (7 days) and monthly (30 days) average durations - Update SleepStatsOverview UI to show weekly and monthly averages instead of total duration and overall average - Update unit and screenshot test suites Co-authored-by: felixbrucker <5189997+felixbrucker@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Coverage Report
|
… SQL
- Remove obsolete getAllSessions() from SleepSessionDao and SleepRepository
- Add getAverageWeeklyDuration() and getAverageMonthlyDuration() queries in SleepSessionDao using unixepoch('now', '-7 days') * 1000 and unixepoch('now', '-30 days') * 1000
- Connect weekly and monthly SQL average flows directly to SleepViewModel uiState
- Update unit tests and test fakes for DAO, Repository, and ViewModel
Co-authored-by: felixbrucker <5189997+felixbrucker@users.noreply.github.com>
Paginated sleep records using Room Paging 3, removed total sleep duration and average sleep duration from the UI, and added weekly (last 7 days) and monthly (last 30 days) sleep duration averages calculated directly via Room SQL queries.
PR created automatically by Jules for task 14714767446794302206 started by @felixbrucker