From 9e558d92f2423a4e9216c0eb92415e62833dbcb2 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Tue, 23 Nov 2021 08:21:53 +1100 Subject: [PATCH] Select first tagger result if resolved (#2051) --- ui/v2.5/src/components/Changelog/versions/v0120.md | 1 + ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Changelog/versions/v0120.md b/ui/v2.5/src/components/Changelog/versions/v0120.md index ba6343b60..d4d67339c 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0120.md +++ b/ui/v2.5/src/components/Changelog/versions/v0120.md @@ -6,6 +6,7 @@ * Added plugin hook for Tag merge operation. ([#2010](https://github.com/stashapp/stash/pull/2010)) ### 🐛 Bug fixes +* Select first scene result in scene tagger where possible. ([#2051](https://github.com/stashapp/stash/pull/2051)) * Reject dates with invalid format. ([#2052](https://github.com/stashapp/stash/pull/2052)) * Fix Autostart Video on Play Selected and Continue Playlist default settings not working. ([#2050](https://github.com/stashapp/stash/pull/2050)) * Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017)) diff --git a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx index f3c26314d..7debcbc90 100755 --- a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx +++ b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx @@ -655,7 +655,7 @@ const StashSearchResult: React.FC = ({ export interface ISceneSearchResults { target: GQL.SlimSceneDataFragment; - scenes: GQL.ScrapedSceneDataFragment[]; + scenes: IScrapedScene[]; } export const SceneSearchResults: React.FC = ({ @@ -667,6 +667,8 @@ export const SceneSearchResults: React.FC = ({ useEffect(() => { if (!scenes) { setSelectedResult(undefined); + } else if (scenes.length > 0 && scenes[0].resolved) { + setSelectedResult(0); } }, [scenes]);