Apply task-scoped media preparation events to the shared Qt composer
This commit is contained in:
1 parent
b37d66f3cb
commit
0c3a416e29
2 files changed
+10
No files matched your search
@@ -1054,6 +1054,15 @@ void MessageList::requestDmMessages(const QString& channelId) {
|
||||
gui_bridge_post_uasync_fn(dm_messages_trampoline, req);
|
||||
}
|
||||
|
||||
void MessageList::onAttachmentPreparation(const uint8_t* data, int len) {
|
||||
if (!data || len < 18 || len != 18 + data[0] || data[len - 1] > 2) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_MEDIA, "Invalid attachment preparation event bytes=%d", len); return;
|
||||
}
|
||||
int length = data[0];
|
||||
m_inputBar->updatePreparation(QString::fromUtf8((const char*)data + 1, length),
|
||||
QByteArray((const char*)data + 1 + length, 16), data[len - 1]);
|
||||
}
|
||||
|
||||
void MessageList::onDmMessages(const uint8_t* data, int len) {
|
||||
if (len < 3) return;
|
||||
uint8_t cl = data[0];
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
void updateMessageProgress(const QString& chId, int64_t msgId, int blocksDone, int numBlocks);
|
||||
void onAttachmentDownloaded(const QString& chId, int64_t msgId);
|
||||
void onDmMessages(const uint8_t* data, int len);
|
||||
void onAttachmentPreparation(const uint8_t* data, int len);
|
||||
void onRadioTalk(quint64 groupId, quint64 srcNodeId, bool on); /* индикация говорящего */
|
||||
|
||||
signals:
|
||||
|
||||
Reference in new issue
Block a user