Оптимизирован код вложений, исправлена установка аватарки на диалог, а не у отправителя
This commit is contained in:
@@ -19,7 +19,7 @@ export function MessageAvatar(props: AttachmentProps) {
|
||||
download,
|
||||
downloadStatus,
|
||||
getBlob,
|
||||
getPreview} = useAttachment(props.attachment, props.chacha_key_plain);
|
||||
getPreview} = useAttachment(props.attachment, props.parent);
|
||||
const mainRef = useRef<HTMLDivElement>(null);
|
||||
const { open } = useImageViewer();
|
||||
const preview = getPreview();
|
||||
|
||||
@@ -19,7 +19,7 @@ export function MessageFile(props : AttachmentProps) {
|
||||
} =
|
||||
useAttachment(
|
||||
props.attachment,
|
||||
props.chacha_key_plain,
|
||||
props.parent,
|
||||
);
|
||||
const preview = getPreview();
|
||||
const error = downloadStatus == DownloadStatus.ERROR;
|
||||
|
||||
@@ -19,7 +19,7 @@ export function MessageImage(props: AttachmentProps) {
|
||||
download,
|
||||
downloadStatus,
|
||||
getBlob,
|
||||
getPreview } = useAttachment(props.attachment, props.chacha_key_plain);
|
||||
getPreview } = useAttachment(props.attachment, props.parent);
|
||||
const mainRef = useRef<HTMLDivElement>(null);
|
||||
const error = downloadStatus == DownloadStatus.ERROR;
|
||||
const { open } = useImageViewer();
|
||||
|
||||
Reference in New Issue
Block a user