Let lib handles cache

This commit is contained in:
xmflsct 2023-02-03 00:59:39 +01:00
parent 3545c13ae9
commit 5ec49739fc
3 changed files with 3 additions and 14 deletions

1
.gitignore vendored
View File

@ -32,6 +32,7 @@ DerivedData
*.xcuserstate
project.xcworkspace
ios/.xcode.env.local
ios/containers
# Android/IntelliJ
#

View File

@ -157,7 +157,7 @@ const Timeline: React.FC<Props> = ({
) {
setAccountStorage([{ key: readMarker, value: firstItemId }])
} else {
// setAccountStorage([{ key: readMarker, value: '109519141378761752' }])
// setAccountStorage([{ key: readMarker, value: '105250709762254246' }])
}
}
}

View File

@ -11,7 +11,6 @@ import * as Localization from 'expo-localization'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Linking, Platform } from 'react-native'
import FastImage from 'react-native-fast-image'
import { GLOBAL } from '../../../../App'
import { mapFontsizeToName } from '../SettingsFontsize'
@ -171,7 +170,7 @@ const SettingsApp: React.FC = () => {
/>
<MenuRow
title={t('screenTabs:me.settings.autoplayGifv.heading')}
switchValue={autoplayGifv}
switchValue={autoplayGifv || false}
switchOnValueChange={() => setAutoplayGifv(!autoplayGifv)}
/>
{showConnect ? (
@ -184,17 +183,6 @@ const SettingsApp: React.FC = () => {
}}
/>
) : null}
<MenuRow
title='Clear cache'
iconBack='chevron-right'
loading={clearingCache}
onPress={() => {
setClearingCache(true)
FastImage.clearDiskCache()
.then(() => setClearingCache(false))
.catch(() => setClearingCache(false))
}}
/>
</MenuContainer>
)
}