Skip to content

new ui for home#1075

Merged
Tlaster merged 4 commits intomasterfrom
feature/new_ui
Jul 7, 2025
Merged

new ui for home#1075
Tlaster merged 4 commits intomasterfrom
feature/new_ui

Conversation

@Tlaster
Copy link
Copy Markdown
Contributor

@Tlaster Tlaster commented Jul 5, 2025

No description provided.

@Tlaster Tlaster requested a review from Copilot July 5, 2025 06:25

This comment was marked as outdated.

@Tlaster Tlaster requested a review from Copilot July 5, 2025 06:34

This comment was marked as outdated.

@Tlaster Tlaster requested a review from Copilot July 7, 2025 04:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 into MastodonPaging
  • Add DbPagingKey entity, DAO methods, and persistence in BaseRemoteMediator
  • 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 of endOfPaginationReached, and nextKey handling).
            }.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

@Tlaster Tlaster merged commit 4ca7292 into master Jul 7, 2025
4 of 6 checks passed
@Tlaster Tlaster deleted the feature/new_ui branch July 7, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants