Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mobile): pick, share, and receive files in threads #8237

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 26 commits intomain fromrefs/pull/8237/headmerged by juliusmarminge View on GitHub

Showing 47 changed files with 38 additions and 20 deletions (loading 43).

x
0 of 47 viewed, 47 left
36 additions and 18 deletionsapps/mobile/src/components/ComposerAttachmentStrip.tsxModified
View file
@@ -1,12 +1,13 @@
import { SymbolView } from "../components/AppSymbol";
import { Image, Pressable, ScrollView, View } from "react-native";
​
-import type { DraftComposerImageAttachment } from "../lib/composerImages";
+import { AppText as Text } from "./AppText";
+import type { DraftComposerAttachment } from "../lib/composerImages";
​
export interface ComposerAttachmentStripProps {
- /** Attachment images to display. */
- readonly attachments: ReadonlyArray<DraftComposerImageAttachment>;
- /** Called when the user taps the remove button on an image. */
+ /** Attachments to display. */
+ readonly attachments: ReadonlyArray<DraftComposerAttachment>;
+ /** Called when the user removes an attachment. */
readonly onRemove: (imageId: string) => void;
/** Called when the user taps on an image thumbnail to preview it. */
readonly onPressImage?: (previewUri: string) => void;
@@ -19,8 +20,7 @@
​
/**
- * A horizontally-scrollable strip of image attachment thumbnails with remove
- * buttons. Used by both the thread composer and the new-task draft screen.
+ * Attachment thumbnails used by the thread composer and the new-task draft screen.
*/
export function ComposerAttachmentStrip(props: ComposerAttachmentStripProps) {
const size = props.imageSize ?? 72;
@@ -40,29 +40,47 @@