fix: close installer after opening patched app

This commit is contained in:
Alberto Ponces 2022-08-22 00:54:58 +01:00
parent 092d645726
commit 9317714651

View File

@ -17,8 +17,14 @@ class InstallerView extends StatelessWidget {
floatingActionButton: Visibility(
visible: !model.isPatching,
child: FloatingActionButton.extended(
onPressed: () =>
model.isInstalled ? model.openApp() : model.installResult(),
onPressed: () {
if (model.isInstalled) {
model.openApp();
Navigator.of(context).pop();
} else {
model.installResult();
}
},
label: I18nText(model.isInstalled
? 'installerView.fabOpenButton'
: 'installerView.fabInstallButton'),