Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web,mobile): a running Read's image shows a loading frame, not "Image unavailable" #42976

Closedjuliusmarmingewants to merge 1 commit intomain fromrefs/pull/42976/headopened View on GitHub

Showing 10 changed files with 28 additions and 14 deletions (loading 7).

x
0 of 10 viewed, 10 left
13 additions and 2 deletionsapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -2137,9 +2137,20 @@
const thumbnailWidth = Math.floor((props.contentWidth - VIEWED_IMAGE_GAP) / 2);
return (
<View className="flex-row flex-wrap pb-2" style={{ gap: VIEWED_IMAGE_GAP }}>
- {entry.paths.map((path) => (
+ {entry.images.map(({ path, pending }) => (
<View key={path} style={{ width: thumbnailWidth }}>
- {props.renderViewedImage({ href: path, alt: null, title: null })}
+ {pending ? (
+ // The running Read may not have written the file yet: hold its frame unrequested.
+ <ThreadMarkdownImageView
+ uri={null}
+ sourceKey={path}
+ unavailable={false}
+ alt={null}
+ onPressPreview={props.onPressPreview}
+ />
+ ) : (
+ props.renderViewedImage({ href: path, alt: null, title: null })
+ )}
</View>
</View>
6 additions and 5 deletionsapps/mobile/src/lib/threadActivity.tsModified
View file
@@ -30,8 +30,9 @@
resolveWorkEntryToolPresentation,
summarizeToolGroup,