Browse Source
app/settings/privacy.tsx 的 switch 分支渲染为 View + Switch,未绑定 onPress;而 handlePress(内部 router.push(item.route))只挂在 Pressable 分支上,导致带 route 的开关型条目点击无任何反应。 mock 数据中共 7 条 type: 'switch' 条目挂着 route(real-name / contact / algo / third-party / location / contacts / dnd),对应 app/settings/privacy/[id].tsx(279 行,覆盖 6 个 slug)与 dnd.tsx (295 行)两个实页面,运行期完全不可达,违反「有页面出口就一定要 有入口」规范。 对照证据:同组末尾的 keyword-block 是 type: 'value',走 Pressable 分支,其 /settings/privacy/keywords(357 行)可正常进入。这种不对称 证明是漏绑而非设计意图。 修法:仅将左侧文字区包为 Pressable 触发跳转,并补 chevron-forward 提示可点;右侧 Switch 保持独立切换,二者为兄弟节点不嵌套,互不干扰。 无 route 的开关(如「头像公开」)行为不变。master
1 changed files with 23 additions and 8 deletions
Loading…
Reference in new issue