main → zio/dev
This commit is contained in:
commit
bb706ebdc2
22 changed files with 407 additions and 181 deletions
|
|
@ -136,3 +136,12 @@ export const GIF_FEATURED = (params: string) =>
|
|||
`${GIF_SERVICE}/tenor/v2/featured?${params}`
|
||||
|
||||
export const MAX_LABELERS = 20
|
||||
|
||||
export const SUPPORTED_MIME_TYPES = [
|
||||
'video/mp4',
|
||||
'video/mpeg',
|
||||
'video/webm',
|
||||
'video/quicktime',
|
||||
] as const
|
||||
|
||||
export type SupportedMimeTypes = (typeof SUPPORTED_MIME_TYPES)[number]
|
||||
|
|
|
|||
|
|
@ -91,13 +91,15 @@ export function CountWheel({
|
|||
likeCount,
|
||||
big,
|
||||
isLiked,
|
||||
isToggle,
|
||||
}: {
|
||||
likeCount: number
|
||||
big?: boolean
|
||||
isLiked: boolean
|
||||
isToggle: boolean
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const shouldAnimate = !useReducedMotion()
|
||||
const shouldAnimate = !useReducedMotion() && isToggle
|
||||
const shouldRoll = decideShouldRoll(isLiked, likeCount)
|
||||
|
||||
// Incrementing the key will cause the `Animated.View` to re-render, with the newly selected entering/exiting
|
||||
|
|
|
|||
|
|
@ -39,13 +39,15 @@ export function CountWheel({
|
|||
likeCount,
|
||||
big,
|
||||
isLiked,
|
||||
isToggle,
|
||||
}: {
|
||||
likeCount: number
|
||||
big?: boolean
|
||||
isLiked: boolean
|
||||
isToggle: boolean
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const shouldAnimate = !useReducedMotion()
|
||||
const shouldAnimate = !useReducedMotion() && isToggle
|
||||
const shouldRoll = decideShouldRoll(isLiked, likeCount)
|
||||
|
||||
const countView = React.useRef<HTMLDivElement>(null)
|
||||
|
|
|
|||
|
|
@ -71,13 +71,15 @@ const circle2Keyframe = new Keyframe({
|
|||
export function AnimatedLikeIcon({
|
||||
isLiked,
|
||||
big,
|
||||
isToggle,
|
||||
}: {
|
||||
isLiked: boolean
|
||||
big?: boolean
|
||||
isToggle: boolean
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const size = big ? 22 : 18
|
||||
const shouldAnimate = !useReducedMotion()
|
||||
const shouldAnimate = !useReducedMotion() && isToggle
|
||||
|
||||
return (
|
||||
<View>
|
||||
|
|
|
|||
|
|
@ -41,13 +41,15 @@ const circle2Keyframe = [
|
|||
export function AnimatedLikeIcon({
|
||||
isLiked,
|
||||
big,
|
||||
isToggle,
|
||||
}: {
|
||||
isLiked: boolean
|
||||
big?: boolean
|
||||
isToggle: boolean
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const size = big ? 22 : 18
|
||||
const shouldAnimate = !useReducedMotion()
|
||||
const shouldAnimate = !useReducedMotion() && isToggle
|
||||
const prevIsLiked = React.useRef(isLiked)
|
||||
|
||||
const likeIconRef = React.useRef<HTMLDivElement>(null)
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ export async function compressVideo(
|
|||
|
||||
const info = await getVideoMetaData(compressed)
|
||||
|
||||
return {uri: compressed, size: info.size, mimeType: `video/${info.extension}`}
|
||||
return {uri: compressed, size: info.size, mimeType: `video/mp4`}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue