From 6f7cc11b86ac288d925540fa3734b86cb7d1c6cc Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Fri, 22 Jul 2022 17:18:11 +1000 Subject: [PATCH] Fix incorrect image displayed in lightbox (#2754) * Fix incorrect image displayed in lightbox * Add changelog --- ui/v2.5/src/components/Changelog/Changelog.tsx | 10 ++++++++-- ui/v2.5/src/components/Changelog/versions/v0161.md | 2 ++ ui/v2.5/src/hooks/Lightbox/hooks.ts | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 ui/v2.5/src/components/Changelog/versions/v0161.md diff --git a/ui/v2.5/src/components/Changelog/Changelog.tsx b/ui/v2.5/src/components/Changelog/Changelog.tsx index 2a970fdb1..da38f5c7c 100644 --- a/ui/v2.5/src/components/Changelog/Changelog.tsx +++ b/ui/v2.5/src/components/Changelog/Changelog.tsx @@ -20,6 +20,7 @@ import V0131 from "./versions/v0131.md"; import V0140 from "./versions/v0140.md"; import V0150 from "./versions/v0150.md"; import V0160 from "./versions/v0160.md"; +import V0161 from "./versions/v0161.md"; import { MarkdownPage } from "../Shared/MarkdownPage"; // to avoid use of explicit any @@ -58,9 +59,9 @@ const Changelog: React.FC = () => { // after new release: // add entry to releases, using the current* fields // then update the current fields. - const currentVersion = stashVersion || "v0.16.0"; + const currentVersion = stashVersion || "v0.16.1"; const currentDate = buildDate; - const currentPage = V0160; + const currentPage = V0161; const releases: IStashRelease[] = [ { @@ -69,6 +70,11 @@ const Changelog: React.FC = () => { page: currentPage, defaultOpen: true, }, + { + version: "v0.16.0", + date: "2022-07-05", + page: V0160, + }, { version: "v0.15.0", date: "2022-05-18", diff --git a/ui/v2.5/src/components/Changelog/versions/v0161.md b/ui/v2.5/src/components/Changelog/versions/v0161.md new file mode 100644 index 000000000..1d5b143dc --- /dev/null +++ b/ui/v2.5/src/components/Changelog/versions/v0161.md @@ -0,0 +1,2 @@ +### 🐛 Bug fixes +* Fix incorrect image being displayed when first previewing image. ([#2754](https://github.com/stashapp/stash/pull/2754)) diff --git a/ui/v2.5/src/hooks/Lightbox/hooks.ts b/ui/v2.5/src/hooks/Lightbox/hooks.ts index f2863b55b..cf3ce8ff6 100644 --- a/ui/v2.5/src/hooks/Lightbox/hooks.ts +++ b/ui/v2.5/src/hooks/Lightbox/hooks.ts @@ -10,7 +10,6 @@ export const useLightbox = (state: Partial>) => { images: state.images, showNavigation: state.showNavigation, pageCallback: state.pageCallback, - initialIndex: state.initialIndex, pageHeader: state.pageHeader, slideshowEnabled: state.slideshowEnabled, onClose: state.onClose, @@ -20,7 +19,6 @@ export const useLightbox = (state: Partial>) => { state.images, state.showNavigation, state.pageCallback, - state.initialIndex, state.pageHeader, state.slideshowEnabled, state.onClose,