Fix update dialog looping after download completes
After OpenFile.open() the state was reset to UpdateStatus.available, which re-triggered the app.dart listener (downloading → available satisfies the prev != available condition) and showed the dialog again. Fix: reset to idle so the system installer can proceed uninterrupted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,11 +124,9 @@ class UpdateNotifier extends Notifier<UpdateState> {
|
||||
type: 'application/vnd.android.package-archive',
|
||||
);
|
||||
|
||||
// Return to available so the user can retry install if they dismissed it.
|
||||
state = state.copyWith(
|
||||
status: UpdateStatus.available,
|
||||
downloadProgress: 1.0,
|
||||
);
|
||||
// Transition to idle — the system installer is now open.
|
||||
// Going back to `available` would re-trigger the update dialog loop.
|
||||
state = const UpdateState();
|
||||
} catch (e) {
|
||||
state = state.copyWith(
|
||||
status: UpdateStatus.error,
|
||||
|
||||
Reference in New Issue
Block a user