From 2045bf284e42728ae52d9cff38a40336183f0c4a Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Mon, 16 Feb 2026 20:16:12 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D0=B8=D0=BD?= =?UTF-8?q?=D1=85=D1=80=D0=BE=D0=BD=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D0=BF=D0=BE=D0=B4=D1=82=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=B5?= =?UTF-8?q?=D0=B2=D0=B0=D0=B9=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/providers/DialogProvider/useSynchronize.ts | 9 ++------- app/providers/ProtocolProvider/protocol/protocol.ts | 2 +- app/version.ts | 8 +++----- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/providers/DialogProvider/useSynchronize.ts b/app/providers/DialogProvider/useSynchronize.ts index aa7e146..0456a64 100644 --- a/app/providers/DialogProvider/useSynchronize.ts +++ b/app/providers/DialogProvider/useSynchronize.ts @@ -21,15 +21,10 @@ export function useSynchronize() { const {protocol} = useProtocol(); useEffect(() => { - const handshake_complete = () => { + if(protocol.handshakeExchangeComplete){ trySync(); } - protocol.on('handshake_complete', handshake_complete); - - return () => { - protocol.off('handshake_complete', handshake_complete); - } - }, [protocol]); + }, [protocol.handshakeExchangeComplete]); const trySync = async () => { const lastSyncTime = await getQuery(`SELECT last_sync FROM accounts_sync_times WHERE account = ?`, [publicKey]); diff --git a/app/providers/ProtocolProvider/protocol/protocol.ts b/app/providers/ProtocolProvider/protocol/protocol.ts index 1fe6486..2189a6a 100644 --- a/app/providers/ProtocolProvider/protocol/protocol.ts +++ b/app/providers/ProtocolProvider/protocol/protocol.ts @@ -34,7 +34,7 @@ export default class Protocol extends EventEmitter { private _supportedPackets: Map = new Map(); private _packetWaiters: Map void)[]> = new Map(); private _packetQueue: Packet[] = []; // Очередь для пакетов - private handshakeExchangeComplete : boolean = false; + public handshakeExchangeComplete : boolean = false; private heartbeatIntervalTimer : NodeJS.Timeout | null = null; constructor(serverAddress: string) { diff --git a/app/version.ts b/app/version.ts index 57d1869..660ebca 100644 --- a/app/version.ts +++ b/app/version.ts @@ -1,9 +1,7 @@ -export const APP_VERSION = "0.9.9"; +export const APP_VERSION = "1.0.0"; export const CORE_MIN_REQUIRED_VERSION = "1.4.8"; export const RELEASE_NOTICE = ` -**Update v0.9.9** :emoji_1f631: -- Synchronization devices! -- New fast server -- Fix login select account bug +**Update v1.0.0** :emoji_1f631: +- Full sync support with message history and attachments `; \ No newline at end of file