Clean thumb cache, 1.4m
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
import {clearCache, createVideoThumbnail} from 'react-native-compressor'
|
import {clearCache, createVideoThumbnail} from 'react-native-compressor'
|
||||||
import Animated, {FadeIn} from 'react-native-reanimated'
|
import Animated, {FadeIn} from 'react-native-reanimated'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {QueryClient, useQuery} from '@tanstack/react-query'
|
import {type QueryClient, useQuery} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
|
|
||||||
export const RQKEY = 'video-thumbnail'
|
export const RQKEY = 'video-thumbnail'
|
||||||
|
|
||||||
export function clearThumbnailCache(queryClient: QueryClient) {
|
export function clearThumbnailCache(queryClient: QueryClient) {
|
||||||
clearCache()
|
clearCache().catch(() => {})
|
||||||
queryClient.resetQueries({queryKey: [RQKEY]})
|
queryClient.resetQueries({queryKey: [RQKEY]})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user