Fix tracker search results missing bound track record

There is a possibility that the source changed the manga title after the track record was bound.
In that case it is possible that the track record won't be found anymore when executing the search.

Thus, instead of using the manga title as the search string, the existing track records title should be used instead to make sure that the bound track record will be included in the search results.
This commit is contained in:
schroda
2026-05-05 11:21:55 +02:00
parent 1ee454c137
commit e38031a02f
2 changed files with 4 additions and 1 deletions

View File

@@ -117,16 +117,18 @@ export const TrackerSearch = ({
tracker,
closeSearchMode,
trackedId,
trackedTitle,
}: {
manga: MangaIdInfo & Pick<MangaType, 'title'>;
tracker: TTrackerBind;
closeSearchMode: () => void;
trackedId?: string;
trackedTitle?: string;
}) => {
const { t } = useLingui();
const getOptionForDirection = useGetOptionForDirection();
const [searchString, setSearchString] = useState<string>(manga.title);
const [searchString, setSearchString] = useState<string>(trackedTitle ?? manga.title);
const [tmpSearchString, setTmpSearchString] = useState(searchString);
const [selectedTrackerRemoteId, setSelectedTrackerRemoteId] = useState<string | undefined>(trackedId);