From 1858b15588c4662ef8562c7b42eb41b3813d4786 Mon Sep 17 00:00:00 2001
From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Date: Tue, 31 Aug 2021 18:19:18 -0700
Subject: [PATCH] Hide previous/next buttons in fullscreen lightbox
---
ts/components/Lightbox.tsx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ts/components/Lightbox.tsx b/ts/components/Lightbox.tsx
index 1de438fbb0..23b6b7282a 100644
--- a/ts/components/Lightbox.tsx
+++ b/ts/components/Lightbox.tsx
@@ -301,8 +301,8 @@ export function Lightbox({
}
}
- const hasNext = selectedIndex < media.length - 1;
- const hasPrevious = selectedIndex > 0;
+ const hasNext = !zoomed && selectedIndex < media.length - 1;
+ const hasPrevious = !zoomed && selectedIndex > 0;
return root
? createPortal(
@@ -381,7 +381,6 @@ export function Lightbox({
@@ -392,7 +391,6 @@ export function Lightbox({