From a00bb22da1e6b1f3d21d478455fa0c10517cb81c Mon Sep 17 00:00:00 2001 From: overtake <> Date: Mon, 3 Sep 2018 00:36:56 +0300 Subject: [PATCH] no message --- TelegramCore/PendingMessageManager.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/TelegramCore/PendingMessageManager.swift b/TelegramCore/PendingMessageManager.swift index b87e74125b..bc04f08fb0 100644 --- a/TelegramCore/PendingMessageManager.swift +++ b/TelegramCore/PendingMessageManager.swift @@ -274,6 +274,12 @@ public final class PendingMessageManager { } else { messageContext.state = .waitingForUploadToStart(groupId: message.groupingKey, upload: contentUploadSignal) } + + if let _ = currentGroupId, message.groupingKey != currentGroupId { + currentGroupId = nil + } else { + currentGroupId = message.groupingKey + } } if let currentGroupId = currentGroupId { @@ -442,9 +448,9 @@ public final class PendingMessageManager { if let current = strongSelf.messageContexts[id] { strongSelf.beginSendingMessage(messageContext: current, messageId: id, groupId: groupId, content: content) strongSelf.updateWaitingUploads(peerId: id.peerId) - if let groupId = groupId { - strongSelf.beginSendingGroupIfPossible(groupId: groupId) - } + //if let groupId = groupId { + // strongSelf.beginSendingGroupIfPossible(groupId: groupId) + // } } } }