Skip to content

Commit

Permalink
fix(mobile): gallery viewer popscope
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlong-tanwen committed Apr 6, 2024
1 parent 8fe9640 commit 6cddf4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions mobile/lib/modules/asset_viewer/views/gallery_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,9 @@ class GalleryViewerPage extends HookConsumerWidget {
}

return PopScope(
canPop: false,
onPopInvoked: (_) {
// Change immersive mode back to normal "edgeToEdge" mode
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
context.pop();
},
// Change immersive mode back to normal "edgeToEdge" mode
onPopInvoked: (_) =>
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge),
child: Scaffold(
backgroundColor: Colors.black,
body: Stack(
Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/modules/search/views/all_people_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AllPeoplePage extends HookConsumerWidget {
'all_people_page_title',
).tr(),
leading: IconButton(
onPressed: () => context.popRoute(),
onPressed: () => context.maybePop(),
icon: const Icon(Icons.arrow_back_ios_rounded),
),
),
Expand Down
10 changes: 5 additions & 5 deletions mobile/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ packages:
dependency: "direct main"
description:
name: auto_route
sha256: "82f8df1d177416bc6b7a449127d0270ff1f0f633a91f2ceb7a85d4f07c3affa1"
sha256: f04022b2a5c4d255f7feb139a75cb3d100ccd2f8918a75036fe09456309a13a3
url: "https://pub.dev"
source: hosted
version: "7.8.4"
version: "8.0.3"
auto_route_generator:
dependency: "direct dev"
description:
name: auto_route_generator
sha256: "11067a3bcd643812518fe26c0c9ec073990286cabfd9d74b6da9ef9b913c4d22"
sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3
url: "https://pub.dev"
source: hosted
version: "7.3.2"
version: "8.0.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -1804,5 +1804,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.2.0 <4.0.0"
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.16.0"

0 comments on commit 6cddf4e

Please sign in to comment.