Merge branch 'master' into subsonic-folder

This commit is contained in:
Patrik Wallström 2026-03-15 03:48:58 +01:00 committed by GitHub
commit 453742d95e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 3 deletions

View File

@ -50,7 +50,9 @@ const useStyles = makeStyles(
const ArtistDetails = (props) => {
const record = useRecordContext(props)
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('sm'))
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('sm'), {
noSsr: true,
})
const [artistInfo, setArtistInfo] = useState()
const biography = artistInfo?.biography || record.biography

View File

@ -83,7 +83,7 @@ const useStyles = makeStyles(
)
const MobileArtistDetails = ({ artistInfo, biography, record }) => {
const img = subsonic.getCoverArtUrl(record)
const img = subsonic.getCoverArtUrl(record, 800)
const [expanded, setExpanded] = useState(false)
const classes = useStyles({ img, expanded })
const title = record.name

View File

@ -85,7 +85,14 @@ const DiscSubtitleRow = forwardRef(
const classes = useStyles({ isDesktop })
const [imageError, setImageError] = useState(false)
const [isLightboxOpen, setLightboxOpen] = useState(false)
const lightboxClosedAt = React.useRef(0)
const handlePlaySubset = (discNumber) => () => {
// Ignore clicks shortly after the lightbox was closed to prevent
// mobile touch events from "falling through" the overlay and
// triggering playback.
if (Date.now() - lightboxClosedAt.current < 400) {
return
}
onClick(discNumber)
}
@ -112,7 +119,10 @@ const DiscSubtitleRow = forwardRef(
[imageError],
)
const handleCloseLightbox = useCallback(() => setLightboxOpen(false), [])
const handleCloseLightbox = useCallback(() => {
lightboxClosedAt.current = Date.now()
setLightboxOpen(false)
}, [])
const subtitle = record.discSubtitle
? record.discSubtitle