mirror of
https://github.com/immich-app/immich.git
synced 2025-01-19 18:26:46 +01:00
fixes gallery viewer fullscreen edge case (#1959)
This commit is contained in:
parent
3cce43309c
commit
8adca31c24
1 changed files with 9 additions and 7 deletions
|
@ -59,6 +59,15 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||||
late Offset localPosition;
|
late Offset localPosition;
|
||||||
final authToken = 'Bearer ${box.get(accessTokenKey)}';
|
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(
|
useEffect(
|
||||||
() {
|
() {
|
||||||
isLoadPreview.value =
|
isLoadPreview.value =
|
||||||
|
@ -247,13 +256,6 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||||
(showAppBar.value && !isZoomed.value)) &&
|
(showAppBar.value && !isZoomed.value)) &&
|
||||||
!isPlayingVideo.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(
|
return AnimatedOpacity(
|
||||||
duration: const Duration(milliseconds: 100),
|
duration: const Duration(milliseconds: 100),
|
||||||
opacity: show ? 1.0 : 0.0,
|
opacity: show ? 1.0 : 0.0,
|
||||||
|
|
Loading…
Reference in a new issue