Implementing scroll bar like Google Photos

This commit is contained in:
Alex Tran 2022-02-03 21:01:14 -06:00
parent bafc32f30a
commit 56c92cd83b
9 changed files with 115 additions and 88 deletions
mobile/lib/modules/home/ui

View file

@ -75,12 +75,14 @@ class ImmichSliverAppBar extends ConsumerWidget {
onPressed: () async {
var onPop = await AutoRouter.of(context).push(const BackupControllerRoute());
// Fetch new image
if (onPop == true) {
// Remove and force getting new widget again
if (imageGridGroup.isNotEmpty) {
// Remove and force getting new widget again if there is not many widget on screen.
// Otherwise do nothing.
if (imageGridGroup.isNotEmpty && imageGridGroup.length < 20) {
print("Get more access");
ref.read(assetProvider.notifier).getMoreAsset();
} else {
} else if (imageGridGroup.isEmpty) {
print("get immich asset");
ref.read(assetProvider.notifier).getImmichAssets();
}
}