Conversation
95d8b6a to
e27347c
Compare
There was a problem hiding this comment.
Pull request overview
This PR rewrites the “New Profile” UI to Jetpack Compose (ref #65), removing the previous XML/data-binding + RecyclerView adapter implementation and wiring the screen through a Compose-based Design.
Changes:
- Replace
NewProfileDesign’s view-binding + RecyclerView implementation with a ComposeLazyColumnscreen. - Remove the old XML layouts and
ProfileProviderAdapterthat supported the RecyclerView-based UI. - Adjust
NewProfileActivitymanifest entry (removesuiModeconfigChanges and activity label).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| design/src/main/res/layout/design_new_profile.xml | Removed legacy data-binding layout for the New Profile screen. |
| design/src/main/res/layout/adapter_profile_provider.xml | Removed legacy item layout used by the RecyclerView adapter. |
| design/src/main/java/com/github/kr328/clash/design/adapter/ProfileProviderAdapter.kt | Removed RecyclerView adapter superseded by Compose list rendering. |
| design/src/main/java/com/github/kr328/clash/design/NewProfileDesign.kt | Reimplemented New Profile UI in Compose (MihomoScaffold + LazyColumn). |
| app/src/main/AndroidManifest.xml | Updated NewProfileActivity manifest attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| items(items = providers) { provider -> | ||
| ProfileProviderItem( | ||
| provider = provider, | ||
| onClick = { onCreate(provider) }, | ||
| onLongClick = { onDetail(provider) }, | ||
| ) | ||
| } |
There was a problem hiding this comment.
Long-press is now enabled for every provider because combinedClickable always receives an onLongClick lambda, but onDetail is intended to be a conditional action (it returns false for non-External providers). This changes behavior vs the prior setOnLongClickListener { detail(current) } (non-External items weren't long-clickable/consumable). Consider only wiring onLongClick when provider is ProfileProvider.External (or adjust the API to not return a Boolean).
…esign.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit e5fa339.
Refs #65.