Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors media entry navigation to use modal dialogs and enhances the Home screen to fetch and display user data per account type, updating routing interfaces accordingly.
- Switch media entries from full-screen to dialog strategies with custom properties
- Integrate
UiUserV2state and account-type logic intoHomeScreennavigation rail and FAB actions - Extend all
Routevariants to implement a newWithAccountTypeinterface and add anaccountTypeOrhelper
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| MediaEntryBuilder.kt | Replaced FullScreenSceneStrategy with DialogSceneStrategy and added DialogProperties imports |
| HomeScreen.kt | Added userState via UserPresenter, accountType-based routing, and refactored the scaffold/navigation rail |
| Route.kt | Defined WithAccountType sealed interface for routes, implemented it across all data classes, and added Route.accountTypeOr |
Comments suppressed due to low confidence (1)
app/src/main/java/dev/dimension/flare/ui/screen/media/MediaEntryBuilder.kt:9
- This import appears unused after replacing full-screen strategies with dialogs; consider removing it to clean up imports.
import dev.dimension.flare.ui.component.BottomSheetSceneStrategy
| entry<Route.Media.Image>( | ||
| metadata = FullScreenSceneStrategy.fullScreen() | ||
| metadata = DialogSceneStrategy.dialog( | ||
| dialogProperties = DialogProperties( | ||
| usePlatformDefaultWidth = false, | ||
| decorFitsSystemWindows = false, | ||
| ) |
There was a problem hiding this comment.
[nitpick] The DialogProperties block is repeated for each entry; you could extract it into a shared constant or helper function to reduce duplication.
| import androidx.compose.runtime.mutableStateOf | ||
| import androidx.compose.runtime.remember | ||
| import androidx.compose.runtime.rememberCoroutineScope | ||
| import androidx.compose.runtime.rememberUpdatedState |
There was a problem hiding this comment.
Unused import; rememberUpdatedState isn't referenced in this file. Remove it to declutter the import list.
| import androidx.compose.runtime.rememberUpdatedState |
| FloatingActionButton( | ||
| onClick = { | ||
| navigate( | ||
| Route.Compose.New( |
There was a problem hiding this comment.
[nitpick] The Route.Compose.New navigation call is duplicated in both collapsed and expanded FABs; consider extracting it into a helper to avoid redundancy.
add tap refresh to home tab
No description provided.