fix the focus state of home page on android tv - #839
Merged
Merged
Conversation
when pressing down key, it will focus on the first item(Stopped/Running) We should keep it focusing on the first item, no need to press down key
Author
Chloemlla
added a commit
to Chloemlla/ClashMetaForAndroid
that referenced
this pull request
Sep 23, 2026
Merge MetaCubeX/ClashMetaForAndroid main (559594d) into fork main. 上游本次 2 个提交:4483af43 "change mips stack to default tun stack mode"、 559594d "fix the focus state of home page on android tv …(MetaCubeX#839)", 共动 2 个文件,无删除/改名;冲突 1 个。 Conflict resolution: - design/src/main/res/layout/design_main.xml: 上游这一步的全部增量只有一处 —— 给状态卡片加 <requestFocus />(自闭合改写成对标签),修 Android TV 首页无焦点项。 fork 在同一文件上改动很大(变量表删 forwarded、加 clashStarting/hasProfile/ statusSubtext/proxySummary;卡片加 status_card id 与 android:clickable;卡片下方 新增流量 sparkline 区块;新增「未配置时创建档案」卡片;代理卡片改 proxySummary; 文件尾部加 Connections/Partners 两个 LargeActionLabel)。取 fork 整份为底稿、 把上游那两行原样贴回。两种整份取一侧都是错的:取上游会吃掉 fork 在冲突块**之外** 的改动(变量表、sparkline、两张新卡片、两个 Label),取 fork 则丢掉上游唯一的修复。 依据:MainDesign.kt 写的是 binding.statusSubtext(format_traffic_forwarded_with_speed) /proxySummary/hasProfile/clashStarting,全仓已无任何代码写 binding.forwarded,说明 fork 删 forwarded 是有意的;LargeActionCard 继承 MaterialCardView(ViewGroup), <requestFocus /> 作为其子元素合法。校验 git diff :2:<path> <工作区> 只显示该两行。 - service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt: 两侧都改但未冲突,自动合并。上游把 tunStackMode 默认值 system → mips(配合内核侧 submodule ab405bad "feat: support stack: mips in tun configuration"),fork 在同一 文件新增计费/伙伴授权/订阅到期/场景/故障转移等一批字段并把 activeProfile 解析改成 防御式。三方交集核对:合并结果 = fork 全量增量 + 上游 mips 一行 (git diff 7180b9e 只见这一处),fork 语义未被吞。 - 本地额外处理(不进提交):core/src/foss/golang/clash 子模块工作区停在 ac017cdd (2026-08-29 后未再 checkout),而 base/fork HEAD/上游 tip 与索引的 gitlink 都是 ab405bad;reset --hard 不更新子模块工作区,故显示成 "new commits"。不处理的话 finish.mjs 会把该 gitlink 一起暂存,等于把上游刚前推的 ab405bad(mips 默认值的内核侧 依赖)回退掉。已 git checkout --detach ab405bad 对齐索引(子模块无本地提交/未跟踪 内容/stash,操作可逆)。 机械解 0 个,人工判定 1 个。审计者(CodeRabbit)无实质意见,仅两条 "LGTM!"; 本次取舍全部按仓库 AGENTS.md 与代码事实判定,逐条见 .sync-audit/ClashMetaForAndroid.report.md。 已知存量红(与本次合并无关,未动手):main tip 7180b9e 的 Verify 就在 :service:kspAlphaReleaseKotlin 上红(kotlinx JsonDecodingException,JSON 输入为空)。 2026-09-01 那次全绿里该 task 是 FROM-CACHE(从未真正执行),三要素 (room.schemaLocation + exportSchema=true + service/schemas/ 下 0 字节 .gitkeep)同源于 fork 提交 394c1db。详见 report。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

fix the focus state of home page on android tv, there's no item focused.
when pressing down key, it will focus on the first item(Stopped/Running)
We should keep it focusing on the first item, no need to press down key
I've tested on android tv and android phone.
please review, thanks