Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates paging behavior by introducing a paging key entity and response wrappers, adjusts several RemoteMediators to emit nextKey and handle end-of-pagination correctly, bumps the Room database version to register the new entity, and overhauls home UI navigation (tabs, bottom bar, FAB animations) along with minor refactors in tab defaults and screen components.
- Switch timeline endpoints to return
Response<List<Status>>and parse intoMastodonPaging - Add
DbPagingKeyentity, DAO methods, and persistence inBaseRemoteMediator - Revamp navigation scaffold and home screens: new animated bottom bar, updated tabs, FAB control
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| TimelineResources.kt | Changed return types from raw lists to Response<List<Status>> |
| FavouriteTimelineRemoteMediator.kt | Adapted to use MastodonPaging and track nextKey |
| BookmarkTimelineRemoteMediator.kt | Same paging adjustments as favorites mediator |
| DbPagingTimeline.kt | Added new DbPagingKey entity |
| PagingTimelineDao.kt | DAO methods for inserting, querying, deleting paging keys |
| CacaheDatabase.kt | Bumped database version and registered DbPagingKey |
| BaseRemoteMediator.kt | Persist and clear DbPagingKey, expose nextKey in result |
| TabSettings.kt | Refactored tab default lists and introduced secondaryFor |
| TabAddBottomSheet.kt | Switched from defaultSecondary to secondaryFor and updated defaults |
| TimelineScreen.kt, HomeTimelineScreen.kt | Removed old FAB code and scale animations |
| HomeScreen.kt | Added FAB visibility flags to scaffold call |
| ComposeScreen.kt | Removed cross-post conditional wrapper (likely unintended) |
| NavigationSuiteScaffold2.kt | Full rewrite: new ShortNavigationBarItem, shared transitions, FAB animations |
Comments suppressed due to low confidence (6)
shared/src/commonMain/kotlin/dev/dimension/flare/data/database/cache/CacaheDatabase.kt:1
- The filename is spelled 'CacaheDatabase.kt'; consider renaming to 'CacheDatabase.kt' (and updating any references) to fix the typo.
package dev.dimension.flare.data.database.cache
shared/src/commonMain/kotlin/dev/dimension/flare/data/datasource/mastodon/BookmarkTimelineRemoteMediator.kt:45
- [nitpick] The variable name 'lastItem' is misleading here since it holds the 'nextKey'; consider renaming it to 'lastKey' or 'nextKey' for clarity.
database.pagingTimelineDao().getPagingKey(pagingKey)?.nextKey
app/src/main/java/dev/dimension/flare/ui/screen/compose/ComposeScreen.kt:217
- The conditional wrapper around cross-post (enableCrossPost) was removed, causing the row to always render; re-introduce the check to restore the intended behavior.
Column(
shared/src/commonMain/kotlin/dev/dimension/flare/data/database/cache/model/DbPagingTimeline.kt:34
- [nitpick] Add KDoc for the new DbPagingKey entity and its fields (pagingKey, nextKey, prevKey) to clarify their purpose and usage.
@Entity
shared/src/commonMain/kotlin/dev/dimension/flare/data/datasource/mastodon/FavouriteTimelineRemoteMediator.kt:54
- Consider adding unit tests for FavouriteTimelineRemoteMediator to validate paging logic (parsing of
Response, calculation ofendOfPaginationReached, andnextKeyhandling).
}.let { MastodonPaging.from(it) }
shared/src/commonMain/kotlin/dev/dimension/flare/data/database/cache/CacaheDatabase.kt:11
- Database version was bumped to 21 but no Room migration was provided; add a migration or specify a fallback strategy to prevent runtime crashes for existing users.
internal const val CACHE_DATABASE_VERSION = 21
No description provided.