[GIFs] Replace GIPHY with Tenor (#3651)
* replace GIPHY with Tenor * remove "directly" wording * replace GIPHY wording * remove log
This commit is contained in:
parent
1a4e05e9f9
commit
76449fb6ef
6 changed files with 220 additions and 335 deletions
|
@ -29,8 +29,8 @@ import {
|
|||
useLanguagePrefs,
|
||||
useLanguagePrefsApi,
|
||||
} from '#/state/preferences/languages'
|
||||
import {Gif} from '#/state/queries/giphy'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
import {Gif} from '#/state/queries/tenor'
|
||||
import {ThreadgateSetting} from '#/state/queries/threadgate'
|
||||
import {getAgent, useSession} from '#/state/session'
|
||||
import {useComposerControls} from '#/state/shell/composer'
|
||||
|
@ -316,18 +316,19 @@ export const ComposePost = observer(function ComposePost({
|
|||
}, [])
|
||||
|
||||
const onSelectGif = useCallback(
|
||||
(gif: Gif) =>
|
||||
(gif: Gif) => {
|
||||
setExtLink({
|
||||
uri: `${gif.url}?hh=${gif.images.original.height}&ww=${gif.images.original.width}`,
|
||||
uri: `${gif.media_formats.gif.url}?hh=${gif.media_formats.gif.dims[0]}&ww=${gif.media_formats.gif.dims[1]}`,
|
||||
isLoading: true,
|
||||
meta: {
|
||||
url: gif.url,
|
||||
image: gif.images.original_still.url,
|
||||
url: gif.media_formats.gif.url,
|
||||
image: gif.media_formats.preview.url,
|
||||
likelyType: LikelyType.HTML,
|
||||
title: `${gif.title} - Find & Share on GIPHY`,
|
||||
description: `ALT: ${gif.alt_text}`,
|
||||
title: gif.content_description,
|
||||
description: `ALT: ${gif.content_description}`,
|
||||
},
|
||||
}),
|
||||
})
|
||||
},
|
||||
[setExtLink],
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue