1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00

fixes gallery viewer fullscreen edge case (#1959)

This commit is contained in:
martyfuhry 2023-03-11 07:42:35 -05:00 committed by GitHub
parent 3cce43309c
commit 8adca31c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,15 @@ class GalleryViewerPage extends HookConsumerWidget {
late Offset localPosition;
final authToken = 'Bearer ${box.get(accessTokenKey)}';
showAppBar.addListener(() {
// Change to and from immersive mode, hiding navigation and app bar
if (showAppBar.value) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
} else {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
}
});
useEffect(
() {
isLoadPreview.value =
@ -247,13 +256,6 @@ class GalleryViewerPage extends HookConsumerWidget {
(showAppBar.value && !isZoomed.value)) &&
!isPlayingVideo.value;
// Change to and from immersive mode, hiding navigation and app bar
if (show) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
} else {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
}
return AnimatedOpacity(
duration: const Duration(milliseconds: 100),
opacity: show ? 1.0 : 0.0,