2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Allow editing spoiler/caption-above in EditCaptionBox.

This commit is contained in:
John Preston
2024-05-30 00:01:18 +04:00
parent 8c0351be4e
commit 974bf99921
21 changed files with 247 additions and 156 deletions

View File

@@ -595,16 +595,7 @@ bool SendFilesBox::hasSendMenu(const SendMenu::Details &details) const {
}
bool SendFilesBox::hasSpoilerMenu() const {
const auto allAreVideo = !ranges::any_of(_list.files, [](const auto &f) {
using Type = Ui::PreparedFile::Type;
return (f.type != Type::Video);
});
const auto allAreMedia = !ranges::any_of(_list.files, [](const auto &f) {
using Type = Ui::PreparedFile::Type;
return (f.type != Type::Photo) && (f.type != Type::Video);
});
return allAreVideo
|| (allAreMedia && _sendWay.current().sendImagesAsPhotos());
return _list.hasSpoilerMenu(_sendWay.current().sendImagesAsPhotos());
}
void SendFilesBox::applyBlockChanges() {