1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fixes after upgrades

This commit is contained in:
Zhiyuan Zheng
2022-05-08 23:40:42 +02:00
parent 1d6790c76e
commit d9e1530b8b
23 changed files with 67 additions and 63 deletions

View File

@ -1,6 +1,6 @@
import Button from '@components/Button'
import { StyleConstants } from '@utils/styles/constants'
import { Video } from 'expo-av'
import { ResizeMode, Video, VideoFullscreenUpdate } from 'expo-av'
import React, { useCallback, useEffect, useRef, useState } from 'react'
import {
AppState,
@ -110,15 +110,14 @@ const AttachmentVideo: React.FC<Props> = ({
source: { uri: video.url }
}
: {
resizeMode: 'cover',
resizeMode: ResizeMode.COVER,
posterSource: { uri: video.preview_url },
posterStyle: { resizeMode: 'cover' }
posterStyle: { resizeMode: ResizeMode.COVER }
})}
useNativeControls={false}
onFullscreenUpdate={async event => {
if (
event.fullscreenUpdate ===
Video.FULLSCREEN_UPDATE_PLAYER_DID_DISMISS
event.fullscreenUpdate === VideoFullscreenUpdate.PLAYER_DID_DISMISS
) {
if (gifv) {
await videoPlayer.current?.pauseAsync()

View File

@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
export interface Props {
status: Pick<
Mastodon.Status,
'content' | 'spoiler_text' | 'emojis' | 'mentions' | 'tags'
>
status: Pick<Mastodon.Status, 'content' | 'spoiler_text' | 'emojis'> & {
mentions?: Mastodon.Status['mentions']
tags?: Mastodon.Status['tags']
}
numberOfLines?: number
highlighted?: boolean
disableDetails?: boolean

View File

@ -9,11 +9,11 @@ import { FormattedDate, FormattedRelativeTime, FormattedTime } from 'react-intl'
export interface Props {
created_at: Mastodon.Status['created_at'] | number
edited_at?: Mastodon.Status['edited_at']
highlighted: boolean
highlighted?: boolean
}
const HeaderSharedCreated = React.memo(
({ created_at, edited_at, highlighted }: Props) => {
({ created_at, edited_at, highlighted = false }: Props) => {
const { t } = useTranslation('componentTimeline')
const { colors } = useTheme()

View File

@ -4,7 +4,6 @@ import haptics from '@components/haptics'
import Icon from '@components/Icon'
import { displayMessage } from '@components/Message'
import { ParseEmojis } from '@components/Parse'
import RelativeTime from '@components/RelativeTime'
import CustomText from '@components/Text'
import {
MutationVarsTimelineUpdateStatusProperty,