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:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user