2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-08-31 05:55:08 +00:00

Better handling of downloads with no or empty captions

When caption is empty string, or for stickers which don't have captions,
don't show empty message before downloading, but still show
"Downloading" notification even for stickers.
This commit is contained in:
Arseniy Lartsev
2020-05-27 20:44:03 +02:00
parent 565794cf17
commit d65a1639c2
3 changed files with 69 additions and 1 deletions

View File

@@ -755,7 +755,9 @@ void PurpleTdClient::showFile(const td::td_api::chat &chat, const TgMessageInfo
g_free(fileSizeStr);
}
if (caption && !notice.empty()) {
if (caption && (*caption == '\0'))
caption = NULL;
if (!notice.empty()) {
notice = makeNoticeWithSender(chat, message, notice.c_str(), m_account);
showMessageText(m_data, chat, message, caption, notice.c_str());
}