mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Added mini icon to drafts with reply.
This commit is contained in:
@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_forum_topic.h"
|
||||
#include "data/data_saved_sublist.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/stickers/data_custom_emoji.h"
|
||||
#include "dialogs/dialogs_list.h"
|
||||
#include "dialogs/dialogs_three_state_icon.h"
|
||||
#include "dialogs/ui/dialogs_video_userpic.h"
|
||||
@@ -468,7 +469,7 @@ void PaintRow(
|
||||
: tr::lng_dialogs_text_with_from(
|
||||
tr::now,
|
||||
lt_from_part,
|
||||
draftWrapped,
|
||||
std::move(draftWrapped),
|
||||
lt_message,
|
||||
DialogsPreviewText({
|
||||
.text = draft->textWithTags.text,
|
||||
@@ -476,13 +477,22 @@ void PaintRow(
|
||||
draft->textWithTags.tags),
|
||||
}),
|
||||
Text::WithEntities);
|
||||
if (draft && draft->reply) {
|
||||
auto &data = thread->owner().customEmojiManager();
|
||||
const auto internal = data.registerInternalEmoji(
|
||||
st::dialogsMiniReplyIcon,
|
||||
{},
|
||||
false);
|
||||
draftText = Ui::Text::SingleCustomEmoji(
|
||||
std::move(internal)).append(std::move(draftText));
|
||||
}
|
||||
const auto context = Core::MarkedTextContext{
|
||||
.session = &thread->session(),
|
||||
.customEmojiRepaint = customEmojiRepaint,
|
||||
};
|
||||
cache.setMarkedText(
|
||||
st::dialogsTextStyle,
|
||||
draftText,
|
||||
std::move(draftText),
|
||||
DialogTextOptions(),
|
||||
context);
|
||||
}
|
||||
|
Reference in New Issue
Block a user