1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-19 18:26:46 +01:00

Add text notifying user that no asset is found (#2400)

This commit is contained in:
Atul Mehla 2023-05-08 22:07:06 -02:30 committed by GitHub
parent 053104fc50
commit 5885ec8e65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 13 deletions

View file

@ -111,16 +111,20 @@ class ArchivePage extends HookConsumerWidget {
return Scaffold( return Scaffold(
appBar: buildAppBar(), appBar: buildAppBar(),
body: Stack( body: archivedAssets.value.isEmpty
children: [ ? const Center(
ImmichAssetGrid( child: Text('No archived assets found.'),
assets: archivedAssets.value, )
listener: selectionListener, : Stack(
selectionActive: selectionEnabledHook.value, children: [
), ImmichAssetGrid(
if (selectionEnabledHook.value) buildBottomBar() assets: archivedAssets.value,
], listener: selectionListener,
), selectionActive: selectionEnabledHook.value,
),
if (selectionEnabledHook.value) buildBottomBar()
],
),
); );
} }
} }

View file

@ -26,9 +26,13 @@ class FavoritesPage extends HookConsumerWidget {
return Scaffold( return Scaffold(
appBar: buildAppBar(), appBar: buildAppBar(),
body: ImmichAssetGrid( body: ref.watch(favoriteAssetProvider).isEmpty
assets: ref.watch(favoriteAssetProvider), ? const Center(
), child: Text('No favorite assets found.'),
)
: ImmichAssetGrid(
assets: ref.watch(favoriteAssetProvider),
),
); );
} }
} }