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