fixed searching from drawer on mobile
This commit is contained in:
parent
fe8415fced
commit
426264d186
3 changed files with 9 additions and 4 deletions
|
@ -15,6 +15,11 @@ All notable changes to this project will be documented in this file.
|
|||
- Slideshow: keep playing when losing focus but app is still visible (e.g. split screen)
|
||||
- upgraded Flutter to stable v3.16.7
|
||||
|
||||
### Fixed
|
||||
|
||||
- crash when loading some large DNG in viewer
|
||||
- searching from drawer on mobile
|
||||
|
||||
## <a id="v1.10.2"></a>[v1.10.2] - 2023-12-24
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -50,7 +50,7 @@ class PageNavTile extends StatelessWidget {
|
|||
: null,
|
||||
onTap: () {
|
||||
Navigator.maybeOf(context)?.pop();
|
||||
final route = routeBuilder(context, routeName);
|
||||
final route = routeBuilder(context, routeName, topLevel);
|
||||
if (topLevel) {
|
||||
Navigator.maybeOf(context)?.pushAndRemoveUntil(
|
||||
route,
|
||||
|
@ -65,7 +65,7 @@ class PageNavTile extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
static Route routeBuilder(BuildContext context, String routeName) {
|
||||
static Route routeBuilder(BuildContext context, String routeName, bool topLevel) {
|
||||
switch (routeName) {
|
||||
case SearchPage.routeName:
|
||||
final currentCollection = context.read<CollectionLens?>();
|
||||
|
@ -74,7 +74,7 @@ class PageNavTile extends StatelessWidget {
|
|||
searchFieldLabel: context.l10n.searchCollectionFieldHint,
|
||||
searchFieldStyle: Themes.searchFieldStyle(context),
|
||||
source: context.read<CollectionSource>(),
|
||||
parentCollection: currentCollection?.copyWith(),
|
||||
parentCollection: topLevel ? currentCollection?.copyWith() : currentCollection,
|
||||
),
|
||||
);
|
||||
default:
|
||||
|
|
|
@ -253,7 +253,7 @@ class _TvRailState extends State<TvRail> {
|
|||
|
||||
void _goTo(String routeName) {
|
||||
Navigator.maybeOf(context)?.pushAndRemoveUntil(
|
||||
PageNavTile.routeBuilder(context, routeName),
|
||||
PageNavTile.routeBuilder(context, routeName, true),
|
||||
(route) => false,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue