Repository navigation
Androidのライブアップデートが呼ばれなくなっていた問題を修正 - #6580
Merged
Merged
Conversation
高頻度atom購読の隔離(#6422)でライブアクティビティ更新フックをiOS限定でマウントするようにした際、 同じフックから呼んでいるAndroidのライブアップデート(Android 16以降)も止まっていた。 通知先を持つプラットフォームでのみマウントする条件へ変更する。 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XHQB1iKjHbZLmPDKysVpnt
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughLive Activities更新処理の対象をiOSから、対象Androidプラットフォームにも拡張します。対象外の端末では更新コンポーネントをレンダーしません。 ChangesLive Activities platform対応
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Member
Author
|
@coderabbitai review |
Contributor
✅ Action performedReview finished.
|
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.
概要
Android 16(API 36)以降で表示されるライブアップデート通知(
Notification.ProgressStyle)が、実際には一度も呼び出されていない状態になっていたため修正します。LiveUpdateModuleを叩くstartLiveUpdate/updateLiveUpdate/stopLiveUpdateの唯一の呼び出し元はuseUpdateLiveActivitiesですが、#6422(高頻度 atom 購読の隔離)で同フックがFxUpdateLiveActivitiesへ移された際にPlatform.OS === 'ios'のゲートが付き、Android ではマウントされなくなっていました。useUpdateLiveActivitiesにstartLiveUpdate系を追加。当時はフックが Main 画面の本体から無条件に呼ばれていたため Android でも動作変更の種類
変更内容
FxUpdateLiveActivitiesのマウント条件をPlatform.OS === 'ios' || IS_LIVE_UPDATE_ELIGIBLE_PLATFORMに変更ライブアップデートは駅名・接近・停車・進捗など毎秒変化する項目を必要とするため、ウィジェット同期のような低頻度の部分購読では代替できず、
activityStateの派生計算を回す必要があります。そのため、#6422 が避けたコストを無条件に戻さないよう、実際に通知先を持つ iOS と Android 16 以降 に限ってマウントする条件としています(Android 15 以下では従来どおり派生計算ごと止まります)。テスト
npm run lint/npm test(208 suites・2195 tests passed)/npm run typecheckをローカルで実行し、いずれも成功しています。プラットフォーム分岐 1 行の変更で、既存フックの入出力は変えていないためユニットテストの追加はしていません。実機での動作確認(Android 16 端末で乗車中に進捗通知が出ること、Android 15 以下で従来どおり何も出ないこと)をお願いします。
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
作業環境に実機がないため未取得です。
Note
#6577(Android ウィジェットの修正)も
src/screens/Main.tsxの近い行を変更しています。どちらか一方をマージした後にコンフリクトが出る可能性がありますが、内容は独立しているため解決は単純です(必要なら私の方で解消します)。Generated by Claude Code
Summary by CodeRabbit