Remove KLIPY from external media settings (#10496)
This commit is contained in:
@@ -8,7 +8,10 @@ import {useLingui} from '@lingui/react'
|
||||
import {parseAltFromGIFDescription} from '#/lib/gif-alt-text'
|
||||
import {useHaptics} from '#/lib/haptics'
|
||||
import {shareUrl} from '#/lib/sharing'
|
||||
import {parseEmbedPlayerFromUrl} from '#/lib/strings/embed-player'
|
||||
import {
|
||||
exemptExternalEmbedSources,
|
||||
parseEmbedPlayerFromUrl,
|
||||
} from '#/lib/strings/embed-player'
|
||||
import {toNiceDomain} from '#/lib/strings/url-helpers'
|
||||
import {useExternalEmbedsPrefs} from '#/state/preferences'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
@@ -40,8 +43,9 @@ export const ExternalEmbed = ({
|
||||
const imageUri = link.thumb
|
||||
const embedPlayerParams = useMemo(() => {
|
||||
const params = parseEmbedPlayerFromUrl(link.uri)
|
||||
|
||||
if (params && externalEmbedPrefs?.[params.source] !== 'hide') {
|
||||
if (!params) return
|
||||
const canShow = externalEmbedPrefs?.[params.source] !== 'hide'
|
||||
if (canShow || exemptExternalEmbedSources.has(params.source)) {
|
||||
return params
|
||||
}
|
||||
}, [link.uri, externalEmbedPrefs])
|
||||
|
||||
Reference in New Issue
Block a user