Conversation
- 间隔档位改为 即时(0)/5/10/30 分钟,默认 5 分钟 - WorkManagerHelper 双路径调度:>=15min 走 PeriodicWorkRequest, <15min(即时/5/10)用 OneTimeWorkRequest 自续期循环 - SyncWorker 同步成功后 scheduleNext 续排下一轮,即时模式连续同步 - 更新四语言字符串与设置默认值
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c3f14a325
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ExistingPeriodicWorkPolicy.UPDATE, | ||
| wm.enqueueUniqueWork( | ||
| UNIQUE_LOOP, | ||
| ExistingWorkPolicy.REPLACE, |
There was a problem hiding this comment.
Avoid replacing the running loop worker
When the selected interval is Immediate/5/10 minutes, the worker that calls scheduleNext() is still the unfinished unique work named sync_loop_work. Enqueuing the next request with ExistingWorkPolicy.REPLACE cancels any unfinished work with that same name, so each successful loop iteration cancels the currently returning worker instead of just scheduling after it; app/start rescheduling can also stop an in-flight loop sync. Use a non-canceling chain policy or a separate request name so the active sync is allowed to finish cleanly.
Useful? React with 👍 / 👎.
No description provided.