Skip to content

fix home ui user display#1024

Merged
Tlaster merged 3 commits intomasterfrom
bugfix/ui_fix
Jun 17, 2025
Merged

fix home ui user display#1024
Tlaster merged 3 commits intomasterfrom
bugfix/ui_fix

Conversation

@Tlaster
Copy link
Copy Markdown
Contributor

@Tlaster Tlaster commented Jun 16, 2025

No description provided.

@Tlaster Tlaster requested a review from Copilot June 16, 2025 08:57
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 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 UiUserV2 state and account-type logic into HomeScreen navigation rail and FAB actions
  • Extend all Route variants to implement a new WithAccountType interface and add an accountTypeOr helper

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

Comment on lines 17 to +22
entry<Route.Media.Image>(
metadata = FullScreenSceneStrategy.fullScreen()
metadata = DialogSceneStrategy.dialog(
dialogProperties = DialogProperties(
usePlatformDefaultWidth = false,
decorFitsSystemWindows = false,
)
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The DialogProperties block is repeated for each entry; you could extract it into a shared constant or helper function to reduce duplication.

Copilot uses AI. Check for mistakes.
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

Unused import; rememberUpdatedState isn't referenced in this file. Remove it to declutter the import list.

Suggested change
import androidx.compose.runtime.rememberUpdatedState

Copilot uses AI. Check for mistakes.
FloatingActionButton(
onClick = {
navigate(
Route.Compose.New(
Copy link

Copilot AI Jun 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The Route.Compose.New navigation call is duplicated in both collapsed and expanded FABs; consider extracting it into a helper to avoid redundancy.

Copilot uses AI. Check for mistakes.
@Tlaster Tlaster merged commit eb7e6f5 into master Jun 17, 2025
4 of 5 checks passed
@Tlaster Tlaster deleted the bugfix/ui_fix branch June 17, 2025 04:57
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