On attachment save include date, include album index

This commit is contained in:
Scott Nonnenberg 2019-03-08 12:27:45 -08:00
parent 0b0dfbce9d
commit bf904ddd12
4 changed files with 29 additions and 6 deletions

View file

@ -24,7 +24,7 @@ interface Props {
i18n: Localizer;
media: Array<MediaItemType>;
onSave?: (
{ attachment, message }: { attachment: AttachmentType; message: Message }
options: { attachment: AttachmentType; message: Message; index: number }
) => void;
selectedIndex: number;
}
@ -98,8 +98,8 @@ export class LightboxGallery extends React.Component<Props, State> {
const { selectedIndex } = this.state;
const mediaItem = media[selectedIndex];
const { attachment, message } = mediaItem;
const { attachment, message, index } = mediaItem;
onSave({ attachment, message });
onSave({ attachment, message, index });
};
}