Skip to content

Rewrite NewProfileScreen#81

Merged
Goooler merged 6 commits intotrunkfrom
rewrite-new-profile-design
Apr 20, 2026
Merged

Rewrite NewProfileScreen#81
Goooler merged 6 commits intotrunkfrom
rewrite-new-profile-design

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 20, 2026

Refs #65.

Copy link
Copy Markdown

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 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 Compose LazyColumn screen.
  • Remove the old XML layouts and ProfileProviderAdapter that supported the RecyclerView-based UI.
  • Adjust NewProfileActivity manifest entry (removes uiMode configChanges 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.

Comment thread design/src/main/java/com/github/kr328/clash/design/NewProfileDesign.kt Outdated
Comment thread design/src/main/java/com/github/kr328/clash/design/NewProfileDesign.kt Outdated
Comment on lines +95 to +101
items(items = providers) { provider ->
ProfileProviderItem(
provider = provider,
onClick = { onCreate(provider) },
onLongClick = { onDetail(provider) },
)
}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment thread app/src/main/AndroidManifest.xml
Goooler and others added 5 commits April 20, 2026 14:41
@Goooler Goooler merged commit c2c132c into trunk Apr 20, 2026
1 check passed
@Goooler Goooler deleted the rewrite-new-profile-design branch April 20, 2026 06:52
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