2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Closed beta 10019010: unified attach button, new intro, new stickers.

Now all files sending is confirmed before preparing for sending.
You can paste from clipboard and drag many files at once.
This commit is contained in:
John Preston
2016-11-28 18:45:07 +03:00
parent 26c08236cd
commit 3cff50009c
92 changed files with 1702 additions and 1588 deletions

View File

@@ -1033,7 +1033,7 @@ void DocumentOpenClickHandler::doOpen(DocumentData *data, HistoryItem *context,
psOpenFile(filepath);
}
if (App::main()) App::main()->mediaMarkRead(data);
} else if (data->size < MediaViewImageSizeLimit) {
} else if (data->size < App::kImageSizeLimit) {
if (!data->data().isEmpty() && playAnimation) {
if (action == ActionOnLoadPlayInline && context && context->getMedia()) {
context->getMedia()->playInline(context);
@@ -1284,7 +1284,7 @@ void DocumentData::performActionOnLoad() {
auto loc = location(true);
auto already = loc.name();
auto item = _actionOnLoadMsgId.msg ? App::histItemById(_actionOnLoadMsgId) : nullptr;
bool showImage = !isVideo() && (size < MediaViewImageSizeLimit);
bool showImage = !isVideo() && (size < App::kImageSizeLimit);
bool playVoice = voice() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen);
bool playMusic = song() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen);
bool playAnimation = isAnimation() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && showImage && item && item->getMedia();