fix: GUI double send getOfflineMessage

This commit is contained in:
semenov
2025-09-18 13:27:23 +03:00
parent ced8a5cc64
commit 441be217d9
7 changed files with 12 additions and 53 deletions

View File

@@ -573,7 +573,7 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
chatSystem->sendOldMessages(client->getClient()->getId());
}
Logger::instance().log(client->getClient()->getLogin() + clientNotify.Code,LogLevel::DEBUG);
Logger::instance().log(client->getClient()->getLogin() + " notifyCode " + clientNotify.Code,LogLevel::DEBUG);
}
void ProcessingSystem::setCurrentDataInfo(DataInfo *dataInfo)

View File

@@ -56,10 +56,7 @@ private:
qint64 sizeReceiveData;
qint64 fileSize;
int countSend;
bool isPackageTypeInited;
void packetTypeInit(PacketType packet,Client *client);
//void packetTypeInit(PacketType type);
bool checkIsChangeable();
};

View File

@@ -78,34 +78,6 @@ void SendSystem::sendFileBlock(QString path)
void SendSystem::sendFileBlockByteArray(QByteArray array, PacketType packetType)
{
// qDebug() << "sendFileBlockByteArray thread: " << QThread::currentThreadId();
// if(client->getClientType() == TypeClientAutorization::TYPE_QT_CLIENT ||
// client->getClientType() == TypeClientAutorization::TYPE_GUI)
// {
// QDataStream stream(socket);
// stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
// fileSize = array.size();
// if(fileSize == 0){
// Logger::instance().log(" WARNING! Zero size ",LogLevel::ERROR);
// return;
// }
// stream << packetType; //Отправляем тип блока
// stream << fileSize;
// stream << array;
// }
// else
// {
// sendPacketType(packetType);
// QByteArray message;
// int size = array.length();
// message.append(reinterpret_cast<char*>(&size), sizeof(int));
// socket->write(message);
// socket->write(array);
// }
if(client->getClientType() == TypeClientAutorization::TYPE_QT_CLIENT ||
client->getClientType() == TypeClientAutorization::TYPE_GUI)
{