Skip to content

Commit

Permalink
O3-961: Photo caption is not displayed in attachments (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
abertnamanya authored Jun 29, 2022
1 parent 94d5e7b commit bf3207f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Attachment {
thumbnail: string;
thumbnailWidth: number;
thumbnailHeight: number;
caption: string;
thumbnailCaption: string;
isSelected: boolean;
dateTime?: string;
bytesMimeType?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function FilePreview(props: FilePreviewProps) {
setSaving(true);
}
},
[props.onSaveFile, saving],
[props.onSaveFile, saving, caption],
);

const cancelCapture = useCallback(
Expand All @@ -50,7 +50,8 @@ export default function FilePreview(props: FilePreviewProps) {
<TextInput
id="caption"
autoFocus
labelText={null}
labelText={``}
autoComplete="off"
readOnly={saving}
placeholder={t('attachmentCaptionInstruction', 'Enter caption')}
onChange={updateCaption}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export function createGalleryEntry(data: any) {
// thumbnailHeight: 212,
thumbnailWidth: 170,
thumbnailHeight: 130,
caption: data.comment,
thumbnailCaption: '',
tags: [{ value: formatDatetime(new Date(data.dateTime)), title: formatDatetime(new Date(data.dateTime)) }],
isSelected: false,
dateTime: formatDatetime(new Date(data.dateTime)),
bytesMimeType: data.bytesMimeType,
Expand Down

0 comments on commit bf3207f

Please sign in to comment.