From e06d65e8a0df7196ff885c0e057eb223a9f447cc Mon Sep 17 00:00:00 2001 From: AmanRajSinghMourya Date: Mon, 25 Aug 2025 11:46:08 +0530 Subject: [PATCH] Minor fix --- .../lib/ui/pages/all_collections_page.dart | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart index a6f38568a9..5a079b242a 100644 --- a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart +++ b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart @@ -96,20 +96,16 @@ class _AllCollectionsPageState extends State try { List collections = []; - switch (widget.viewType) { - case CollectionViewType.homeCollections: - collections = await CollectionService.instance.getCollections(); - break; - case CollectionViewType.outgoingCollections: - final sharedCollections = - await CollectionService.instance.getSharedCollections(); + if (widget.viewType == CollectionViewType.homeCollections) { + collections = await CollectionService.instance.getCollections(); + } else { + final sharedCollections = + await CollectionService.instance.getSharedCollections(); + if (widget.viewType == CollectionViewType.outgoingCollections) { collections = sharedCollections.outgoing; - break; - case CollectionViewType.incomingCollections: - final sharedCollections = - await CollectionService.instance.getSharedCollections(); + } else if (widget.viewType == CollectionViewType.incomingCollections) { collections = sharedCollections.incoming; - break; + } } final regularCollections = [];