mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Merge branch 'main' into candidate
This commit is contained in:
@ -131,7 +131,7 @@ const EmojisList = () => {
|
|||||||
>
|
>
|
||||||
<FastImage
|
<FastImage
|
||||||
enterTransition='fadeIn'
|
enterTransition='fadeIn'
|
||||||
transitionDuration={100}
|
transitionDuration={60}
|
||||||
accessibilityLabel={t('common:customEmoji.accessibilityLabel', {
|
accessibilityLabel={t('common:customEmoji.accessibilityLabel', {
|
||||||
emoji: emoji.shortcode
|
emoji: emoji.shortcode
|
||||||
})}
|
})}
|
||||||
|
@ -88,21 +88,21 @@ const GracefullyImage = ({
|
|||||||
{...(onPress ? { accessibilityRole: 'imagebutton' } : { accessibilityRole: 'image' })}
|
{...(onPress ? { accessibilityRole: 'imagebutton' } : { accessibilityRole: 'image' })}
|
||||||
accessibilityLabel={accessibilityLabel}
|
accessibilityLabel={accessibilityLabel}
|
||||||
accessibilityHint={accessibilityHint}
|
accessibilityHint={accessibilityHint}
|
||||||
style={[style, dimension, { backgroundColor: colors.shimmerDefault }]}
|
style={[style, dimension]}
|
||||||
{...(onPress ? (hidden ? { disabled: true } : { onPress }) : { disabled: true })}
|
{...(onPress ? (hidden ? { disabled: true } : { onPress }) : { disabled: true })}
|
||||||
>
|
>
|
||||||
{uri.preview && !imageLoaded ? (
|
{uri.preview && !imageLoaded ? (
|
||||||
<FastImage
|
<FastImage
|
||||||
source={connectMedia({ uri: uri.preview })}
|
source={connectMedia({ uri: uri.preview })}
|
||||||
enterTransition='fadeIn'
|
enterTransition='fadeIn'
|
||||||
transitionDuration={100}
|
transitionDuration={60}
|
||||||
style={[styles.placeholder, { backgroundColor: colors.shimmerDefault }]}
|
style={[styles.placeholder]}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<FastImage
|
<FastImage
|
||||||
source={connectMedia(source)}
|
source={connectMedia(source)}
|
||||||
enterTransition='fadeIn'
|
enterTransition='fadeIn'
|
||||||
transitionDuration={100}
|
transitionDuration={60}
|
||||||
style={[{ flex: 1 }, imageStyle]}
|
style={[{ flex: 1 }, imageStyle]}
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
setImageLoaded(true)
|
setImageLoaded(true)
|
||||||
|
@ -186,7 +186,7 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
if (!account) {
|
if (!account) {
|
||||||
setGlobalStorage('accounts', (accounts || []).concat([accountKey]))
|
setGlobalStorage('accounts', (accounts || []).concat([accountKey]))
|
||||||
}
|
}
|
||||||
setAccount(accountKey)
|
await setAccount(accountKey)
|
||||||
|
|
||||||
goBack && navigation.goBack()
|
goBack && navigation.goBack()
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
|||||||
>
|
>
|
||||||
<FastImage
|
<FastImage
|
||||||
enterTransition='fadeIn'
|
enterTransition='fadeIn'
|
||||||
transitionDuration={100}
|
transitionDuration={60}
|
||||||
style={{ width: '100%', height: '100%' }}
|
style={{ width: '100%', height: '100%' }}
|
||||||
source={
|
source={
|
||||||
item.local?.thumbnail
|
item.local?.thumbnail
|
||||||
|
@ -33,9 +33,13 @@ export const getGlobalStorage = {
|
|||||||
object: <T extends keyof StorageGlobal>(key: T) => {
|
object: <T extends keyof StorageGlobal>(key: T) => {
|
||||||
const value = storage.global.getString(key)
|
const value = storage.global.getString(key)
|
||||||
if (value?.length) {
|
if (value?.length) {
|
||||||
return JSON.parse(value) as NonNullable<StorageGlobal[T]> extends object
|
try {
|
||||||
? StorageGlobal[T]
|
return JSON.parse(value) as NonNullable<StorageGlobal[T]> extends object
|
||||||
: never
|
? StorageGlobal[T]
|
||||||
|
: never
|
||||||
|
} catch {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
@ -108,9 +112,13 @@ export const getAccountStorage = {
|
|||||||
object: <T extends keyof StorageAccount>(key: T) => {
|
object: <T extends keyof StorageAccount>(key: T) => {
|
||||||
const value = storage.account?.getString(key)
|
const value = storage.account?.getString(key)
|
||||||
if (value?.length) {
|
if (value?.length) {
|
||||||
return JSON.parse(value) as NonNullable<StorageAccount[T]> extends object
|
try {
|
||||||
? StorageAccount[T]
|
return JSON.parse(value) as NonNullable<StorageAccount[T]> extends object
|
||||||
: never
|
? StorageAccount[T]
|
||||||
|
: never
|
||||||
|
} catch {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user