Files
xqwatch/app/src/main/res/navigation/nav_main.xml
T
dongliangandClaude Opus 4.6 1ffdefc887 fix: 通知累积+点击跳转修复
Bug 1: setupBannerClick每次事件覆盖onClick,丢失之前累积的taskIds
修复: 点击时从notificationManager.pendingTaskIds取所有累积ID

Bug 2: 多任务点击跳到接单池全量列表,无法区分新旧
修复: TaskListFragment支持taskIds参数过滤,只显示通知中的任务

Bug 3: allIds.toLongArray()编译错误(List<String>无此方法)
修复: mapNotNull{toLongOrNull()}.toLongArray()

nav_main.xml: taskListFragment新增taskIds可选参数(long[]nullable)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-29 15:15:33 +09:30

73 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_main"
app:startDestination="@id/splashFragment">
<!-- 启动分发页 -->
<fragment
android:id="@+id/splashFragment"
android:name="com.xiaoqu.watch.ui.common.SplashFragment"
android:label="启动">
<action android:id="@+id/action_splash_to_home"
app:destination="@id/homeFragment"
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
<action android:id="@+id/action_splash_to_bind"
app:destination="@id/bindFragment"
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
</fragment>
<!-- 首页 -->
<fragment
android:id="@+id/homeFragment"
android:name="com.xiaoqu.watch.ui.home.HomeFragment"
android:label="首页">
<action android:id="@+id/action_home_to_bind"
app:destination="@id/bindFragment"
app:popUpTo="@id/homeFragment" app:popUpToInclusive="true" />
<!-- 首页 → 任务列表 -->
<action android:id="@+id/action_home_to_taskList"
app:destination="@id/taskListFragment" />
<!-- 首页 → 任务详情(通知横幅点击,1个任务时直接跳详情) -->
<action android:id="@+id/action_home_to_taskDetail"
app:destination="@id/taskDetailFragment" />
</fragment>
<!-- 设备绑定页 -->
<fragment
android:id="@+id/bindFragment"
android:name="com.xiaoqu.watch.ui.bind.BindFragment"
android:label="设备绑定">
<action android:id="@+id/action_bind_to_home"
app:destination="@id/homeFragment"
app:popUpTo="@id/bindFragment" app:popUpToInclusive="true" />
</fragment>
<!-- 任务列表(接收 tableStatus 参数,可选 taskIds 过滤) -->
<fragment
android:id="@+id/taskListFragment"
android:name="com.xiaoqu.watch.ui.task.TaskListFragment"
android:label="任务列表">
<argument android:name="tableStatus" android:defaultValue="2" app:argType="integer" />
<argument android:name="taskIds" android:defaultValue="@null" app:argType="long[]" app:nullable="true" />
<!-- 任务列表 → 任务详情 -->
<action android:id="@+id/action_taskList_to_detail"
app:destination="@id/taskDetailFragment" />
</fragment>
<!-- 任务详情(接收 taskId 参数) -->
<fragment
android:id="@+id/taskDetailFragment"
android:name="com.xiaoqu.watch.ui.task.TaskDetailFragment"
android:label="任务详情">
<argument android:name="taskId" android:defaultValue="0L" app:argType="long" />
</fragment>
<!-- 设备信息 -->
<fragment
android:id="@+id/infoFragment"
android:name="com.xiaoqu.watch.ui.info.InfoFragment"
android:label="设备信息" />
</navigation>