fix(mobile): appBar on home screen animates out and doesnt alter asset grid position (#9026)

This commit is contained in:
Conner Hnatiuk 2024-04-25 08:36:35 -06:00 committed by GitHub
parent 732bd1e652
commit a0d03925e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 18 deletions

View file

@ -98,21 +98,37 @@ class HomePage extends HookConsumerWidget {
}
}
return Scaffold(
appBar: ref.watch(multiselectProvider) ? null : const ImmichAppBar(),
body: MultiselectGrid(
topWidget: (currentUser != null && currentUser.memoryEnabled)
? const MemoryLane()
: const SizedBox(),
renderListProvider: timelineUsers.length > 1
? multiUserAssetsProvider(timelineUsers)
: assetsProvider(currentUser?.isarId),
buildLoadingIndicator: buildLoadingIndicator,
onRefresh: refreshAssets,
stackEnabled: true,
archiveEnabled: true,
editEnabled: true,
),
return Stack(
children: [
MultiselectGrid(
topWidget: (currentUser != null && currentUser.memoryEnabled)
? const MemoryLane()
: const SizedBox(),
renderListProvider: timelineUsers.length > 1
? multiUserAssetsProvider(timelineUsers)
: assetsProvider(currentUser?.isarId),
buildLoadingIndicator: buildLoadingIndicator,
onRefresh: refreshAssets,
stackEnabled: true,
archiveEnabled: true,
editEnabled: true,
),
AnimatedPositioned(
duration: const Duration(milliseconds: 300),
top: ref.watch(multiselectProvider)
? -(kToolbarHeight + MediaQuery.of(context).padding.top)
: 0,
left: 0,
right: 0,
child: Container(
height: kToolbarHeight + MediaQuery.of(context).padding.top,
color: context.themeData.appBarTheme.backgroundColor,
child: const SafeArea(
child: ImmichAppBar(),
),
),
),
],
);
}
}