mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Allow saving emoji to files in debug builds.
This commit is contained in:
parent
3dbadeb232
commit
e24ab4f1ab
1 changed files with 16 additions and 0 deletions
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "history/history_inner_widget.h"
|
||||
|
||||
#include "chat_helpers/stickers_emoji_pack.h"
|
||||
#include "core/file_utilities.h"
|
||||
#include "core/click_handler_types.h"
|
||||
#include "history/history_item_helpers.h"
|
||||
|
@ -32,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/effects/message_sending_animation_controller.h"
|
||||
#include "ui/effects/reaction_fly_animation.h"
|
||||
#include "ui/text/text_options.h"
|
||||
#include "ui/text/text_isolated_emoji.h"
|
||||
#include "ui/boxes/report_box.h"
|
||||
#include "ui/layers/generic_box.h"
|
||||
#include "ui/controls/delete_message_context_action.h"
|
||||
|
@ -2249,6 +2251,20 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
}
|
||||
};
|
||||
|
||||
#ifdef _DEBUG // Sometimes we need to save emoji to files.
|
||||
if (const auto item = _dragStateItem) {
|
||||
const auto emojiStickers = &session->emojiStickersPack();
|
||||
if (const auto view = item->media() ? nullptr : item->mainView()) {
|
||||
if (const auto isolated = view->isolatedEmoji()) {
|
||||
if (const auto sticker = emojiStickers->stickerForEmoji(
|
||||
isolated)) {
|
||||
addDocumentActions(sticker.document, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
const auto asGroup = !Element::Moused()
|
||||
|| (Element::Moused() != Element::Hovered())
|
||||
|| (Element::Moused()->pointState(
|
||||
|
|
Loading…
Add table
Reference in a new issue