diff --git a/ui/v2.5/src/components/Changelog/versions/v0150.md b/ui/v2.5/src/components/Changelog/versions/v0150.md index 466379425..d81896e12 100644 --- a/ui/v2.5/src/components/Changelog/versions/v0150.md +++ b/ui/v2.5/src/components/Changelog/versions/v0150.md @@ -1,3 +1,4 @@ ### 🐛 Bug fixes +* Fix markers not refreshing after creating new marker. ([#2502](https://github.com/stashapp/stash/pull/2502)) * Fix error when submitting scene draft to stash-box without performers. ([#2515](https://github.com/stashapp/stash/pull/2515)) * Fix incorrect video player positioning on touch-enabled devices. ([#2501](https://github.com/stashapp/stash/issues/2501)) \ No newline at end of file diff --git a/ui/v2.5/src/components/ScenePlayer/ScenePlayerScrubber.tsx b/ui/v2.5/src/components/ScenePlayer/ScenePlayerScrubber.tsx index bfdb318d3..f63b19622 100644 --- a/ui/v2.5/src/components/ScenePlayer/ScenePlayerScrubber.tsx +++ b/ui/v2.5/src/components/ScenePlayer/ScenePlayerScrubber.tsx @@ -310,7 +310,7 @@ export const ScenePlayerScrubber: React.FC = ( style={getTagStyle(index)} {...dataAttrs} > - {marker.title} + {marker.title || marker.primary_tag.name} ); }); diff --git a/ui/v2.5/src/components/Shared/Select.tsx b/ui/v2.5/src/components/Shared/Select.tsx index 998046750..64790341d 100644 --- a/ui/v2.5/src/components/Shared/Select.tsx +++ b/ui/v2.5/src/components/Shared/Select.tsx @@ -382,6 +382,16 @@ export const MarkerTitleSuggest: React.FC = (props) => { value: item?.title ?? "", })); const initialIds = props.initialMarkerTitle ? [props.initialMarkerTitle] : []; + + // add initial value to items if still loading, to ensure existing value + // is populated + if (loading && initialIds.length > 0) { + items.push({ + label: initialIds[0], + value: initialIds[0], + }); + } + return ( = (props: IProps) => { title = props.movie.name || ""; } else if (props.marker) { link = NavUtils.makeSceneMarkerUrl(props.marker); - title = `${props.marker.title} - ${TextUtils.secondsToTimestamp( - props.marker.seconds || 0 - )}`; + title = `${ + props.marker.title || props.marker.primary_tag?.name || "" + } - ${TextUtils.secondsToTimestamp(props.marker.seconds || 0)}`; } else if (props.gallery) { link = `/galleries/${props.gallery.id}`; title = props.gallery.title diff --git a/ui/v2.5/src/components/Wall/WallItem.tsx b/ui/v2.5/src/components/Wall/WallItem.tsx index de02e68b3..7ac671e9f 100644 --- a/ui/v2.5/src/components/Wall/WallItem.tsx +++ b/ui/v2.5/src/components/Wall/WallItem.tsx @@ -182,10 +182,12 @@ export const WallItem: React.FC = (props: IWallItemProps) => { const renderText = () => { if (!showTextContainer) return; + const markerTitle = props.sceneMarker?.title; + const title = props.sceneMarker - ? `${props.sceneMarker!.title} - ${TextUtils.secondsToTimestamp( - props.sceneMarker.seconds - )}` + ? `${ + markerTitle ? `${markerTitle} - ` : "" + }${TextUtils.secondsToTimestamp(props.sceneMarker.seconds)}` : props.scene?.title ?? ""; const tags = props.sceneMarker ? [props.sceneMarker.primary_tag, ...props.sceneMarker.tags] diff --git a/ui/v2.5/src/core/StashService.ts b/ui/v2.5/src/core/StashService.ts index 51c4b0cf5..ce6aa8e78 100644 --- a/ui/v2.5/src/core/StashService.ts +++ b/ui/v2.5/src/core/StashService.ts @@ -251,6 +251,7 @@ const sceneMarkerMutationImpactedQueries = [ GQL.FindScenesDocument, GQL.FindSceneMarkersDocument, GQL.MarkerStringsDocument, + GQL.FindSceneMarkerTagsDocument, ]; export const useSceneMarkerCreate = () =>