From 04b7e1cc8a5addb0af017565fab2015859c7dc76 Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Mon, 2 Mar 2026 22:14:15 -0500 Subject: [PATCH] Fix update dialog looping after download completes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/providers/update_provider.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/providers/update_provider.dart b/lib/providers/update_provider.dart index 50fcb80..6ef3473 100644 --- a/lib/providers/update_provider.dart +++ b/lib/providers/update_provider.dart @@ -124,11 +124,9 @@ class UpdateNotifier extends Notifier { 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,