アプリ更新をバックグラウンドで継続できるようにする - #66
Merged
Merged
Conversation
設定画面から離れると ViewModel が破棄され、viewModelScope ごと ダウンロードが打ち切られて進捗表示もリセットされていた。 更新状態と処理を Singleton の AppUpdateManager に移し、 アプリケーションスコープのコルーチンで実行するようにした。 画面を離れてもダウンロードが継続し、戻ったときに進行中の 進捗をそのまま表示できる。
Contributor
UI差分基準画像との差分はありません。 全画面スクリーンショット |
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.



















背景
設定画面でアプリ更新を開始したあと、別の画面へ移動するとステータスがリセットされていた。
更新の状態と処理が SettingsViewModel の viewModelScope に閉じていたため、画面を離れて ViewModel が破棄されると、ダウンロードのコルーチンごと打ち切られ進捗も失われていた。
変更内容
テスト
既知の制限
プロセスが OS に停止された場合のダウンロード継続には対応していない。アプリケーションスコープのため、プロセスが生きている間はバックグラウンドでも継続するが、プロセス死をまたぐには Foreground Service 化が必要になる。
Generated by Claude Code