From 97a9793f9d3912d6d0810d4cf70def09c22991f8 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 30 Sep 2023 21:50:38 -0300 Subject: [PATCH] fix(ui): Disable storage card while volume information is being fetched - Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/317 --- lib/ui/pages/server_storage/storage_card.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ui/pages/server_storage/storage_card.dart b/lib/ui/pages/server_storage/storage_card.dart index ac633463..fbda9bee 100644 --- a/lib/ui/pages/server_storage/storage_card.dart +++ b/lib/ui/pages/server_storage/storage_card.dart @@ -45,8 +45,11 @@ class StorageCard extends StatelessWidget { clipBehavior: Clip.antiAlias, child: InkResponse( highlightShape: BoxShape.rectangle, - onTap: () => - context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)), + + /// TODO: when 'isEmpty' replace with a skeleton + onTap: () => diskStatus.diskVolumes.isEmpty + ? null + : context.pushRoute(ServerStorageRoute(diskStatus: diskStatus)), child: Padding( padding: const EdgeInsets.all(16.0), child: Column(