call exit(0) instead of SystemNavigator.pop() if xmr or wow is enabled hack to "fix" the native lib code from causing a complete app lockup on attempting to quit gracefully

This commit is contained in:
julian 2024-06-13 12:05:59 -06:00
parent f31d47f123
commit 87405bc1dd

View file

@ -20,6 +20,7 @@ import '../providers/desktop/current_desktop_menu_item.dart';
import '../themes/stack_colors.dart';
import '../utilities/assets.dart';
import '../utilities/text_styles.dart';
import '../wallets/crypto_currency/crypto_currency.dart';
import '../widgets/desktop/desktop_tor_status_button.dart';
import '../widgets/desktop/living_stack_icon.dart';
import 'desktop_menu_item.dart';
@ -278,8 +279,14 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
value: 7,
onChanged: (_) {
// todo: save stuff/ notify before exit?
// exit(0);
if (AppConfig.coins
.where((e) => e is Monero || e is Wownero)
.isNotEmpty) {
// hack to insta kill because xmr/wow native lib code sucks
exit(0);
} else {
SystemNavigator.pop();
}
},
controller: controllers[8],
),