From 903185f5a398da0d4a8a6338ddfa237d7712dd0a Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Mon, 11 Dec 2023 17:47:24 +0100 Subject: [PATCH] Add safe area inset bottom to next episode button --- src/components/player/atoms/NextEpisodeButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index b80df3a9..cef4717b 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -62,9 +62,11 @@ export function NextEpisodeButton(props: { if (isHidden || status !== "playing" || duration === 0) show = false; const animation = showingState === "hover" ? "slide-up" : "fade"; - let bottom = "bottom-24"; + let bottom = "bottom-[calc(6rem+env(safe-area-inset-bottom))]"; if (showingState === "always") - bottom = props.controlsShowing ? "bottom-24" : "bottom-12"; + bottom = props.controlsShowing + ? bottom + : "bottom-[calc(3rem+env(safe-area-inset-bottom))]"; const nextEp = meta?.episodes?.find( (v) => v.number === (meta?.episode?.number ?? 0) + 1