Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
@@ -15,6 +15,7 @@ import { AVATAR_PASSWORD_TO_ENCODE } from "@/app/constants";
|
||||
import { useDialog } from "../DialogProvider/useDialog";
|
||||
import { useCore } from "@/app/hooks/useCore";
|
||||
import { MessageProps } from "@/app/components/Messages/Message";
|
||||
import { useGroups } from "../DialogProvider/useGroups";
|
||||
|
||||
export enum DownloadStatus {
|
||||
DOWNLOADED,
|
||||
@@ -39,6 +40,8 @@ export function useAttachment(attachment: Attachment, parentMessage: MessageProp
|
||||
const {info} = useConsoleLogger('useAttachment');
|
||||
const {updateAttachmentsInMessagesByAttachmentId} = useDialog();
|
||||
const {getDownloadsPath} = useCore();
|
||||
const {hasGroup} = useGroups();
|
||||
const {dialog} = useDialog();
|
||||
|
||||
const saveAvatar = useSaveAvatar();
|
||||
|
||||
@@ -186,7 +189,11 @@ export function useAttachment(attachment: Attachment, parentMessage: MessageProp
|
||||
/**
|
||||
* Устанавливаем аватарку тому, кто ее прислал.
|
||||
*/
|
||||
saveAvatar(parentMessage.from, avatarPath, decrypted);
|
||||
let avatarSetTo = parentMessage.from;
|
||||
if(hasGroup(dialog)){
|
||||
avatarSetTo = dialog;
|
||||
}
|
||||
saveAvatar(avatarSetTo, avatarPath, decrypted);
|
||||
return;
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -328,7 +328,6 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
* Обработчик чтения групповых сообщений
|
||||
*/
|
||||
usePacket(0x07, async (packet : PacketRead) => {
|
||||
info("Read packet received in dialog provider");
|
||||
const fromPublicKey = packet.getFromPublicKey();
|
||||
if(fromPublicKey == publicKey){
|
||||
/**
|
||||
@@ -388,7 +387,6 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
}, [publicKey]);
|
||||
|
||||
usePacket(0x08, async (packet : PacketDelivery) => {
|
||||
info("Delivery packet received in dialog provider");
|
||||
const fromPublicKey = packet.getToPublicKey();
|
||||
const messageId = packet.getMessageId();
|
||||
if(fromPublicKey != props.dialog){
|
||||
@@ -514,7 +512,6 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
error("Message dropped because group key not found for group " + toPublicKey);
|
||||
return;
|
||||
}
|
||||
info("New group message packet received from " + fromPublicKey);
|
||||
|
||||
let decryptedContent = '';
|
||||
|
||||
@@ -673,7 +670,6 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
error("Message dropped because group key not found for group " + toPublicKey);
|
||||
return;
|
||||
}
|
||||
info("New group message packet received from " + fromPublicKey);
|
||||
|
||||
let decryptedContent = '';
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ export function ImageViewer(props : ImageViewerProps) {
|
||||
// Wheel zoom (zoom to cursor)
|
||||
const onWheel = (e: React.WheelEvent<HTMLImageElement>) => {
|
||||
//e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const rect = e.currentTarget.getBoundingClientRect();
|
||||
const mouseX = e.clientX - rect.left;
|
||||
const mouseY = e.clientY - rect.top;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
export const APP_VERSION = "1.0.7";
|
||||
export const APP_VERSION = "1.0.8";
|
||||
export const CORE_MIN_REQUIRED_VERSION = "1.5.0";
|
||||
|
||||
export const RELEASE_NOTICE = `
|
||||
**Обновление v1.0.7** :emoji_1f631:
|
||||
- Фикс уведомлений при синхронизации сообщений
|
||||
- Защищенная синхронизация ключей в группах
|
||||
- Синхронизация сообщений в группах
|
||||
- Синхронизация вложений в группах
|
||||
- Синхронизация индикаторов прочтения
|
||||
- Улучшенная организация кода и оптимизации
|
||||
**Обновление v1.0.8** :emoji_1f631:
|
||||
- Фикс проблемы с загрузкой аватарок в некоторых случаях
|
||||
- Фикс фонового скролла при увеличении картинки
|
||||
- Фикс артефактов у картинки
|
||||
`;
|
||||
Reference in New Issue
Block a user