From e26599084568e07a7199701cb3b0cee0e7a21863 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 20 Jan 2024 10:36:16 -0800 Subject: [PATCH] Fixed: Series poster view on mobile devices (cherry picked from commit c0b30a50281c38a103c2f800064d0ec964fae6e0) --- .../src/Artist/Index/Posters/ArtistIndexPosters.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPosters.tsx b/frontend/src/Artist/Index/Posters/ArtistIndexPosters.tsx index cd067053d..9e5c3e885 100644 --- a/frontend/src/Artist/Index/Posters/ArtistIndexPosters.tsx +++ b/frontend/src/Artist/Index/Posters/ArtistIndexPosters.tsx @@ -201,11 +201,15 @@ export default function ArtistIndexPosters(props: ArtistIndexPostersProps) { if (isSmallScreen) { const padding = bodyPaddingSmallScreen - 5; + const width = window.innerWidth - padding * 2; + const height = window.innerHeight; - setSize({ - width: window.innerWidth - padding * 2, - height: window.innerHeight, - }); + if (width !== size.width || height !== size.height) { + setSize({ + width, + height, + }); + } return; }