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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<string, SourceLoadingState>;
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user