From 3ad0b7cdd7803f702294b2cb582ddf9302763876 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 6 Sep 2025 14:21:24 -0500 Subject: [PATCH] fix --- web/repertory/lib/models/mount_list.dart | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/web/repertory/lib/models/mount_list.dart b/web/repertory/lib/models/mount_list.dart index 34f89783..e1e0a047 100644 --- a/web/repertory/lib/models/mount_list.dart +++ b/web/repertory/lib/models/mount_list.dart @@ -183,20 +183,24 @@ class MountList with ChangeNotifier { } Future 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() {