Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
122
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clear link and gif caches to avoid pointing at missing files (#9898)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

authored by

Spence Pope
Claude Opus 4.6
and committed by
GitHub
197c0694 e67d81f2

+13 -3
+2 -2
src/state/queries/resolve-link.ts
··· 6 6 import {useAgent} from '#/state/session' 7 7 import {type Gif} from './tenor' 8 8 9 - const RQKEY_LINK_ROOT = 'resolve-link' 9 + export const RQKEY_LINK_ROOT = 'resolve-link' 10 10 export const RQKEY_LINK = (url: string) => [RQKEY_LINK_ROOT, url] 11 11 12 - const RQKEY_GIF_ROOT = 'resolve-gif' 12 + export const RQKEY_GIF_ROOT = 'resolve-gif' 13 13 export const RQKEY_GIF = (url: string) => [RQKEY_GIF_ROOT, url] 14 14 15 15 export function useResolveLinkQuery(url: string) {
+11 -1
src/state/shell/composer/index.tsx
··· 12 12 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 13 13 import {postUriToRelativePath, toBskyAppUrl} from '#/lib/strings/url-helpers' 14 14 import {purgeTemporaryImageFiles} from '#/state/gallery' 15 - import {precacheResolveLinkQuery} from '#/state/queries/resolve-link' 15 + import { 16 + precacheResolveLinkQuery, 17 + RQKEY_GIF_ROOT, 18 + RQKEY_LINK_ROOT, 19 + } from '#/state/queries/resolve-link' 16 20 import {type EmojiPickerPosition} from '#/view/com/composer/text-input/web/EmojiPicker' 17 21 import * as Toast from '#/view/com/util/Toast' 18 22 ··· 120 124 if (wasOpen) { 121 125 setState(undefined) 122 126 purgeTemporaryImageFiles() 127 + // Purging deletes cached thumbnails on disk, so remove the query 128 + // caches that may hold references to those now-deleted file paths. 129 + // Without this, restoring a draft would serve stale ResolvedLink 130 + // data pointing at missing files, causing "Failed to load blob". 131 + queryClient.removeQueries({queryKey: [RQKEY_LINK_ROOT]}) 132 + queryClient.removeQueries({queryKey: [RQKEY_GIF_ROOT]}) 123 133 } 124 134 125 135 return wasOpen