From 5cc1871f2f538aabc5b2280079fc11ef14768261 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 2 Nov 2020 10:35:38 +0300 Subject: [PATCH] Fix caption/comment label in SendFilesBox. --- Telegram/SourceFiles/boxes/send_files_box.cpp | 1 + Telegram/SourceFiles/ui/chat/attach/attach_prepare.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index f7b7dd7af2..e45b8d21e9 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -591,6 +591,7 @@ void SendFilesBox::pushBlock(int from, int till) { void SendFilesBox::refreshControls() { refreshTitleText(); updateSendWayControlsVisibility(); + updateCaptionPlaceholder(); } void SendFilesBox::setupSendWayControls() { diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_prepare.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_prepare.cpp index be79c4dd65..e24e4107fb 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_prepare.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_prepare.cpp @@ -154,11 +154,15 @@ bool PreparedList::canAddCaption(bool sendingAlbum) const { files, PreparedFile::Type::File, &PreparedFile::type); + const auto hasMusic = ranges::contains( + files, + PreparedFile::Type::Music, + &PreparedFile::type); const auto hasNotGrouped = ranges::contains( files, PreparedFile::Type::None, &PreparedFile::type); - return !hasFiles && !hasNotGrouped; + return !hasFiles && !hasMusic && !hasNotGrouped; } bool PreparedList::hasGroupOption(bool slowmode) const {