Unify MihomoScaffold for all screens#159
Conversation
1e373b5 to
d1e39ab
Compare
There was a problem hiding this comment.
Pull request overview
This PR standardizes screen layout by routing snackbar presentation and top app bar customization through MihomoScaffold, removing per-screen Box + SnackbarHost overlays and aligning screens on a single scaffold pattern.
Changes:
- Extend
MihomoScaffoldwithtopBarandsnackbarHostStatesupport (with a defaultSnackbarHostwhen a state is provided). - Update multiple screens to pass
SnackbarHostStateintoMihomoScaffold/SettingsCommonScreeninstead of renderingSnackbarHostmanually. - Minor cleanup/reordering (e.g., annotation order in editable text screens, removal of now-unneeded imports/wrappers).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/kotlin/com/github/kr328/clash/ui/component/SettingsCommonScreen.kt | Switch from snackbarHost slot to snackbarHostState passthrough into MihomoScaffold. |
| app/src/main/kotlin/com/github/kr328/clash/ui/component/MihomoScaffold.kt | Add topBar slot + snackbarHostState and provide a default SnackbarHost implementation. |
| app/src/main/kotlin/com/github/kr328/clash/settings/ui/NetworkSettingsScreen.kt | Use snackbarHostState on SettingsCommonScreen instead of an inline SnackbarHost. |
| app/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextMapScreen.kt | Minor annotation ordering cleanup around @OptIn / @Composable. |
| app/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextListScreen.kt | Minor annotation ordering cleanup around @OptIn / @Composable. |
| app/src/main/kotlin/com/github/kr328/clash/profile/ui/ProvidersScreen.kt | Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold. |
| app/src/main/kotlin/com/github/kr328/clash/profile/ui/ProfilesScreen.kt | Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold. |
| app/src/main/kotlin/com/github/kr328/clash/profile/ui/NewProfileScreen.kt | Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold. |
| app/src/main/kotlin/com/github/kr328/clash/main/ui/MainScreen.kt | Wrap main content in MihomoScaffold (no top bar) and use scaffold padding for insets/snackbars. |
| app/src/main/kotlin/com/github/kr328/clash/log/ui/LogcatScreen.kt | Replace custom snackbar host slot with snackbarHostState passed into MihomoScaffold. |
| app/src/main/kotlin/com/github/kr328/clash/crash/ui/AppCrashedScreen.kt | Remove now-unnecessary opt-in on the top-level screen function (kept where needed). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.