From aa98bb16e9b1dd496bd8286661a2df5222ceb677 Mon Sep 17 00:00:00 2001 From: "servarr[bot]" <68984020+servarr[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 03:53:28 +0200 Subject: [PATCH] Fixed: Artists poster view on mobile devices (cherry picked from commit c0b30a50281c38a103c2f800064d0ec964fae6e0) Co-authored-by: Mark McDowall --- .../Artist/Index/Posters/ArtistIndexPosters.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 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; - - setSize({ - width: window.innerWidth - padding * 2, - height: window.innerHeight, - }); + const width = window.innerWidth - padding * 2; + const height = window.innerHeight; + + if (width !== size.width || height !== size.height) { + setSize({ + width, + height, + }); + } return; }