This commit is contained in:
2025-09-06 14:21:24 -05:00
parent 1c759c2f7e
commit 3ad0b7cdd7

View File

@@ -183,20 +183,24 @@ class MountList with ChangeNotifier {
}
Future<void> reset() async {
if (constants.navigatorKey.currentContext == null ||
ModalRoute.of(constants.navigatorKey.currentContext!)?.settings.name !=
'/') {
await constants.navigatorKey.currentState?.pushReplacementNamed('/');
if (_mountList.isEmpty) {
return;
}
clear();
Future.delayed(Duration(seconds: 1), () => _fetch());
displayErrorMessage(
constants.navigatorKey.currentContext!,
'Mount removed externally. Reloading...',
);
clear();
Future.delayed(Duration(seconds: 1), _fetch);
if (constants.navigatorKey.currentContext == null ||
ModalRoute.of(constants.navigatorKey.currentContext!)?.settings.name !=
'/') {
await constants.navigatorKey.currentState?.pushReplacementNamed('/');
}
}
void _listener() {