feat: show "appears in" albums on asset viewer bottom sheet
fix: multiple RemoteAlbumPages in navigation stack this also allows us to not have to set the current album before navigating to RemoteAlbumPage chore: clarification comments handle nested album pages fix: hide "appears in" when an asset is not in any albums fix: way more bottom padding for some reason we can't query the safe area here :/
This commit is contained in:
@@ -221,14 +221,15 @@ class _RemoteAlbumPageState extends ConsumerState<RemoteAlbumPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (didPop) {
|
||||
Future.microtask(() {
|
||||
if (mounted) {
|
||||
ref.read(currentRemoteAlbumProvider.notifier).dispose();
|
||||
ref.read(remoteAlbumProvider.notifier).refresh();
|
||||
}
|
||||
});
|
||||
if (didPop || !mounted) {
|
||||
return;
|
||||
}
|
||||
final hasAncestor = context.findAncestorWidgetOfExactType<RemoteAlbumPage>() != null;
|
||||
Navigator.of(context).pop();
|
||||
if (!hasAncestor) {
|
||||
ref.read(currentRemoteAlbumProvider.notifier).dispose();
|
||||
}
|
||||
},
|
||||
child: ProviderScope(
|
||||
|
||||
Reference in New Issue
Block a user