From bfbb84ac21163573e193542d76858811d3e8d14a Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 18 May 2026 21:35:50 +0200 Subject: [PATCH] Fix navigation back after manual migration search When changing the search string during the manual search, the migration page was not opened anymore after selecting a match. Instead, the previous search was opened. --- CHANGELOG.md | 1 + src/features/global-search/screens/SearchAll.tsx | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10fc63e9..5b1ed938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Migration**) Fix showing no info message when no sources are available to select as destinations - (**Migration**) Fix duplicated search matches after resuming the migration search - (**Migration**) Fix search progress not getting updated after a manual search +- (**Migration**) Fix going back to the migration page after a manual search with a changed search string - (**Reader**) Fix scrollbar appearing with "fit to widt/height/screen" page scale mode and applied safe area insets - (**Reader**) Fix wrongly positioned mobile progress bar current page indicator - (**Reader**) Fix mobile progress bar previous/next chapter button visibility on hover and while disabled diff --git a/src/features/global-search/screens/SearchAll.tsx b/src/features/global-search/screens/SearchAll.tsx index 9cb45066..6b43b031 100644 --- a/src/features/global-search/screens/SearchAll.tsx +++ b/src/features/global-search/screens/SearchAll.tsx @@ -58,7 +58,7 @@ import { SourceLanguageSelect } from '@/features/source/components/SourceLanguag import { SearchParam } from '@/base/Base.types.ts'; import { MigrationManager } from '@/features/migration/MigrationManager.ts'; import { assertIsDefined } from '@/base/Asserts.ts'; -import { useBackButton } from '@/base/hooks/useBackButton.ts'; +import { ReactRouter } from '@/lib/react-router/ReactRouter.ts'; type SourceLoadingState = { isLoading: boolean; hasResults: boolean; emptySearch: boolean; error: any }; type SourceToLoadingStateMap = Map; @@ -249,7 +249,6 @@ export const SearchAll = ({ }) => { const { t } = useLingui(); const navigate = useNavigate(); - const handleBack = useBackButton(); const { pathname, state } = useLocation<{ mangaTitle?: string; shouldShowOnlyPinnedSources?: boolean }>(); const { ref: filterHeaderRef, height: filterHeaderHeight } = useElementSize(); @@ -429,7 +428,7 @@ export const SearchAll = ({ sourceTitle: Sources.getFromCache(match.sourceId)?.displayName, latestChapterNumber: undefined, }); - handleBack(); + ReactRouter.navigate(AppRoutes.migrate.path); } : undefined }