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