Skip to content

Rewrite LogsDesign#76

Merged
Goooler merged 10 commits intotrunkfrom
rewrite-logs-design
Apr 20, 2026
Merged

Rewrite LogsDesign#76
Goooler merged 10 commits intotrunkfrom
rewrite-logs-design

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 20, 2026

Refs #65.

@Goooler Goooler force-pushed the rewrite-logs-design branch from 8cf17e7 to f4969c8 Compare April 20, 2026 02:48
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 advances issue #65 (“Rewrite UI in Compose”) by migrating the Logs screen from XML/DataBinding + RecyclerView to a Compose-based implementation, and introducing a shared Compose scaffold for consistent top app bars.

Changes:

  • Replaced LogsDesign’s XML layout + RecyclerView.Adapter with a Compose screen using LazyColumn and a Material3 AlertDialog.
  • Introduced MihomoScaffold and refactored SettingsCommonScreen to use it.
  • Adjusted Design.composeView to provide a lazy ComposeView, and updated HelpDesign/LogsDesign accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
design/src/main/res/layout/design_logs.xml Removes the legacy DataBinding-based logs layout.
design/src/main/java/com/github/kr328/clash/design/component/SettingsCommonScreen.kt Switches settings screen wrapper to use MihomoScaffold.
design/src/main/java/com/github/kr328/clash/design/component/MihomoScaffold.kt Adds a reusable scaffold with a standard top app bar + back handling.
design/src/main/java/com/github/kr328/clash/design/adapter/LogFileAdapter.kt Removes the RecyclerView adapter used by the old logs layout.
design/src/main/java/com/github/kr328/clash/design/LogsDesign.kt Rewrites logs UI in Compose and moves delete-all confirmation into the UI layer.
design/src/main/java/com/github/kr328/clash/design/HelpDesign.kt Updates Compose root initialization to match the new composeView behavior.
design/src/main/java/com/github/kr328/clash/design/Design.kt Makes composeView lazy via unsafeLazy for property delegation.
app/src/main/java/com/github/kr328/clash/LogsActivity.kt Simplifies delete-all handling (confirmation now happens in Compose UI).
app/src/main/AndroidManifest.xml Updates the LogsActivity manifest entry (drops label/configChanges).

💡 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/LogsDesign.kt
Comment thread app/src/main/AndroidManifest.xml
Comment thread design/src/main/java/com/github/kr328/clash/design/LogsDesign.kt
@Goooler Goooler enabled auto-merge (squash) April 20, 2026 03:16
@Goooler Goooler force-pushed the rewrite-logs-design branch from 9061ae0 to 631f40f Compare April 20, 2026 03:18
@Goooler Goooler merged commit c035dce into trunk Apr 20, 2026
1 of 2 checks passed
@Goooler Goooler deleted the rewrite-logs-design branch April 20, 2026 03:27
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