mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
fix(mobile): Fixes immersive mode not ending for memory lane (#7767)
Fixes immersive mode not ending for memory lane
This commit is contained in:
parent
b7e5407822
commit
de28f83d0d
1 changed files with 109 additions and 113 deletions
|
@ -39,11 +39,13 @@ class MemoryPage extends HookConsumerWidget {
|
|||
/// The main vertically scrolling page controller with each list of memories
|
||||
final memoryPageController = usePageController(initialPage: memoryIndex);
|
||||
|
||||
// The Page Controller that scrolls horizontally with all of the assets
|
||||
useEffect(() {
|
||||
// Memories is an immersive activity
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||
return null;
|
||||
return () {
|
||||
// Clean up to normal edge to edge when we are done
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
};
|
||||
});
|
||||
|
||||
toNextMemory() {
|
||||
|
@ -159,12 +161,7 @@ class MemoryPage extends HookConsumerWidget {
|
|||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
body: PopScope(
|
||||
onPopInvoked: (didPop) {
|
||||
// Remove immersive mode and go back to normal mode
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
},
|
||||
child: SafeArea(
|
||||
body: SafeArea(
|
||||
child: PageView.builder(
|
||||
physics: const BouncingScrollPhysics(
|
||||
parent: AlwaysScrollableScrollPhysics(),
|
||||
|
@ -282,7 +279,6 @@ class MemoryPage extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue