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