diff --git a/lib/ui/views/installer/installer_view.dart b/lib/ui/views/installer/installer_view.dart index 7e072b1fe8..7988d6fb80 100644 --- a/lib/ui/views/installer/installer_view.dart +++ b/lib/ui/views/installer/installer_view.dart @@ -23,9 +23,21 @@ class InstallerView extends StatelessWidget { floatingActionButton: Visibility( visible: !model.isPatching && !model.hasErrors, child: FloatingActionButton.extended( - label: I18nText('installerView.installButton'), - icon: const Icon(Icons.file_download_outlined), - onPressed: () => model.installTypeDialog(context), + label: I18nText( + model.isInstalled + ? 'installerView.openButton' + : 'installerView.installButton', + ), + icon: model.isInstalled + ? const Icon(Icons.open_in_new) + : const Icon(Icons.file_download_outlined), + onPressed: model.isInstalled + ? () => { + model.openApp(), + model.cleanPatcher(), + Navigator.of(context).pop(), + } + : () => model.installTypeDialog(context), elevation: 0, ), ),