Skip to content

Remove dead upstream links; trim About screen#50

Merged
hawkff merged 2 commits into
mainfrom
chore/trim-about-and-dead-links
Jun 21, 2026
Merged

Remove dead upstream links; trim About screen#50
hawkff merged 2 commits into
mainfrom
chore/trim-about-and-dead-links

Conversation

@hawkff

@hawkff hawkff commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

Removes dead upstream links and trims the About screen. Keeps the useful info; no
attribution/disclaimer text added (the LICENSE file stays in the repo for GPL compliance — only
the in-app display is removed).

Changes

  • Drawer: remove the Document item (it opened the abandoned matsuridayo.github.io).
  • About screen: remove the Project card (upstream GitHub + Telegram links), the Donate
    button, and the bundled GPL license text block. Keep app version, release/preview update
    checks, sing-box version, installed plugins, and the battery-optimization toggle. Repoint the
    version item's link to our own releases page.
  • Missing-plugin dialog: drop the Learn more button (pointed at the abandoned matsuridayo
    plugin docs) and fix a latent bug — Cancel was registered as a second setNeutralButton and
    silently overridden; it's now a proper negative button.

Verified on-device

  • Drawer no longer shows "Document" (Configuration / Group / Route / Settings / Logs / Tools /
    About only).
  • About shows only: app name + description, Version, Check release/preview updates, sing-box
    version, plugins, Ignore battery optimizations. Donate / Project / Telegram / Source code /
    License / GPL text all absent.

Notes

  • The now-unused string resources (document, donate, donate_info, project, github,
    telegram, license, action_learn_more) are left in place — they're harmless and removing
    them across ~20 locale files would risk orphaned-translation lint (build uses
    warningsAsErrors). lintVitalOssRelease passes.
  • CodeRabbit CLI: No findings.

Greptile Summary

This PR removes dead upstream links (matsuridayo/starifly) from the drawer, About screen, and missing-plugin dialog, and repoints the version tap and update-check API calls to the hawkff fork. It also fixes a latent Android dialog bug where Cancel was silently dropped because it was registered via a second setNeutralButton call instead of setNegativeButton.

  • AboutFragment.kt: Drops the Donate item, Project card (GitHub/Telegram), and the async LICENSE file loader; updates the version-tap URL and both checkUpdate API endpoints from stariflyhawkff.
  • MainActivity.kt: Removes the nav_faq handler (dead matsuridayo docs link) and fixes the missing-plugin dialog so Cancel is a proper negative button.
  • layout/menu XML: Removes the license MaterialCardView and the nav_faq drawer item to match the Kotlin-side removals.

Confidence Score: 5/5

Safe to merge — all changes are removals of dead links or dead UI code, plus a genuine dialog bug fix; no new logic is introduced.

Every change in this PR is either a clean deletion (dead URLs, unused views, duplicate button registration) or a targeted fix of an existing bug. The update-check API and version-tap link are consistently repointed to the same fork, the nav_faq removal is symmetric across both the menu XML and the handler, and replacing the duplicate setNeutralButton with setNegativeButton is straightforwardly correct. There are no new code paths that could regress.

No files require special attention.

Important Files Changed

Filename Overview
app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt Removes dead upstream links (Donate, Project card), drops the async LICENSE-file loader and its binding, repoints the version-tap URL and both checkUpdate API calls from starifly → hawkff. All changes are consistent and clean.
app/src/main/java/io/nekohasekai/sagernet/ui/MainActivity.kt Removes nav_faq handler (dead matsuridayo link) and fixes a latent dialog bug where Cancel was registered as a second setNeutralButton and silently overridden; now correctly uses setNegativeButton.
app/src/main/res/layout/layout_about.xml Removes the MaterialCardView that displayed the GPL license text; the about_fragment_holder FrameLayout used by AboutContent is untouched.
app/src/main/res/menu/main_drawer_menu.xml Removes the nav_faq menu item; the corresponding handler in MainActivity.kt is also removed, so the removal is fully consistent.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User
    participant AboutContent
    participant GitHub as GitHub API (hawkff/NekoBoxForAndroid)
    participant Browser

    User->>AboutContent: Tap version row
    AboutContent->>Browser: Open hawkff/NekoBoxForAndroid/releases

    User->>AboutContent: Tap "Check release update"
    AboutContent->>GitHub: GET /releases/latest
    GitHub-->>AboutContent: Release JSON (name, html_url)
    alt New version available
        AboutContent->>User: Show update dialog
        User->>Browser: Open release URL
    else Up to date
        AboutContent->>User: Toast "No update"
    end

    User->>AboutContent: Tap "Check preview update"
    AboutContent->>GitHub: GET /releases/tags/preview
    GitHub-->>AboutContent: Release JSON (name, html_url)
    alt New preview available
        AboutContent->>User: Show update dialog
    else Up to date
        AboutContent->>User: Toast "No update"
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User
    participant AboutContent
    participant GitHub as GitHub API (hawkff/NekoBoxForAndroid)
    participant Browser

    User->>AboutContent: Tap version row
    AboutContent->>Browser: Open hawkff/NekoBoxForAndroid/releases

    User->>AboutContent: Tap "Check release update"
    AboutContent->>GitHub: GET /releases/latest
    GitHub-->>AboutContent: Release JSON (name, html_url)
    alt New version available
        AboutContent->>User: Show update dialog
        User->>Browser: Open release URL
    else Up to date
        AboutContent->>User: Toast "No update"
    end

    User->>AboutContent: Tap "Check preview update"
    AboutContent->>GitHub: GET /releases/tags/preview
    GitHub-->>AboutContent: Release JSON (name, html_url)
    alt New preview available
        AboutContent->>User: Show update dialog
    else Up to date
        AboutContent->>User: Toast "No update"
    end
Loading

Comments Outside Diff (1)

  1. app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt, line 178-181 (link)

    P2 Update-check API still targets starifly, not hawkff

    The version-tap link was repointed to hawkff/NekoBoxForAndroid/releases, but the two checkUpdate API calls at these lines still resolve against starifly/NekoBoxForAndroid. A user who taps "Check release update" or "Check preview update" hits a different repo than the one linked in the version row, so those checks may never surface a release this fork actually ships — or may surface starifly releases that don't match this build's version strings.

Reviews (2): Last reviewed commit: "review: point update check at hawkff rel..." | Re-trigger Greptile

- Drawer: remove the 'Document' item (opened the abandoned matsuridayo.github.io).
- About: remove the 'Project' card (upstream GitHub + Telegram), the Donate button,
  and the bundled GPL license text block. Keep the useful bits (app version, update
  checks, sing-box version, plugins, battery-optimization). Repoint the version item's\n  link to our own releases page.
- Missing-plugin dialog: drop the 'Learn more' button (pointed at the abandoned\n  matsuridayo plugin docs) and fix a latent bug where Cancel was registered as a second\n  setNeutralButton and silently overridden — Cancel is now a proper negative button.

The LICENSE file remains in the repo (GPL compliance); only the in-app display is\nremoved. No attribution/disclaimer text added.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request removes several UI elements and updates repository links: the license card is deleted from the About layout and its binding setup is removed from code; the FAQ navigation item is removed from the drawer menu and its handler removed from MainActivity; the "learn more" button is removed from the missing-plugin dialog; the donate section and project links card are stripped from the About screen; and the releases URL is updated to point to hawkff/NekoBoxForAndroid.

Changes

UI Removal and Fork Rebranding

Layer / File(s) Summary
About screen: remove license card and simplify initialization
app/src/main/res/layout/layout_about.xml, app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt
Deletes the MaterialCardView license card from the XML layout. Removes Linkify and LayoutAboutBinding imports. Simplifies onViewCreated by eliminating the asset-loading and linkification setup, leaving only window-insets installation and fragment replacement.
About screen: update fork links and remove donate/project sections
app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt
Updates the app-version action item URL to https://github.com/hawkff/NekoBoxForAndroid/releases. Updates both checkUpdate API calls to query hawkff/NekoBoxForAndroid instead of the previous repo. Removes the donate action item and the entire project card section (GitHub/Telegram links) from the material about list.
Navigation: remove FAQ item and dialog button
app/src/main/res/menu/main_drawer_menu.xml, app/src/main/java/io/nekohasekai/sagernet/ui/MainActivity.kt
Removes nav_faq from the drawer menu's "about" group. Removes the nav_faq branch from displayFragmentWithId, eliminating custom-tab navigation for FAQ. Removes the "learn more" button from the missing-plugin dialog, leaving only a cancel button.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇 A rabbit hops through cleaner screens,
No donate cards or FAQ dreams,
The license card? Gone in a flash!
Fewer links, less leftover stash.
hawkff now proudly leads the way—
Simpler About, a tidier day! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: removing dead upstream links and trimming the About screen UI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly articulates all changes made: removal of dead upstream links (matsuridayo), streamlining of About screen with retention of key features, and a bug fix in the missing-plugin dialog. It aligns well with the actual changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt`:
- Line 74: The About page link points to the hawkff/NekoBoxForAndroid release
source, but the checkUpdate() method still references the starifly source.
Update the URLs in the checkUpdate() method (around lines 178 and 180) to use
the same hawkff repository source instead of starifly to ensure consistency
between the About page and update check functionality.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 195eade3-43a4-4a0e-885f-b780b02e6485

📥 Commits

Reviewing files that changed from the base of the PR and between ed61a81 and 43aff6f.

📒 Files selected for processing (4)
  • app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt
  • app/src/main/java/io/nekohasekai/sagernet/ui/MainActivity.kt
  • app/src/main/res/layout/layout_about.xml
  • app/src/main/res/menu/main_drawer_menu.xml
💤 Files with no reviewable changes (2)
  • app/src/main/res/layout/layout_about.xml
  • app/src/main/res/menu/main_drawer_menu.xml

Comment thread app/src/main/java/io/nekohasekai/sagernet/ui/AboutFragment.kt
The About version link now points to hawkff/NekoBoxForAndroid releases, so the update
check (checkUpdate) should query the same source instead of starifly — keeps the update
results consistent with where the About page sends users (and is the correct release
source for our fork).
@hawkff hawkff merged commit 92c45da into main Jun 21, 2026
5 checks passed
@hawkff hawkff deleted the chore/trim-about-and-dead-links branch June 21, 2026 00:21
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.

1 participant