mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added mini icon to drafts with reply.
This commit is contained in:
parent
4288ba2449
commit
b78443cf2d
2 changed files with 14 additions and 2 deletions
|
@ -496,6 +496,8 @@ dialogsMiniForward: DialogsMiniIcon {
|
||||||
skipMedia: 2px;
|
skipMedia: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialogsMiniReplyIcon: icon {{ "mini_forward-flip_horizontal", attentionButtonFg, point(0px, 2px) }};
|
||||||
|
|
||||||
dialogsMiniReplyStory: DialogsMiniIcon {
|
dialogsMiniReplyStory: DialogsMiniIcon {
|
||||||
icon: ThreeStateIcon {
|
icon: ThreeStateIcon {
|
||||||
icon: icon {{ "mini_reply_story", dialogsTextFg, point(0px, 1px) }};
|
icon: icon {{ "mini_reply_story", dialogsTextFg, point(0px, 1px) }};
|
||||||
|
|
|
@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_forum_topic.h"
|
#include "data/data_forum_topic.h"
|
||||||
#include "data/data_saved_sublist.h"
|
#include "data/data_saved_sublist.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
#include "data/stickers/data_custom_emoji.h"
|
||||||
#include "dialogs/dialogs_list.h"
|
#include "dialogs/dialogs_list.h"
|
||||||
#include "dialogs/dialogs_three_state_icon.h"
|
#include "dialogs/dialogs_three_state_icon.h"
|
||||||
#include "dialogs/ui/dialogs_video_userpic.h"
|
#include "dialogs/ui/dialogs_video_userpic.h"
|
||||||
|
@ -468,7 +469,7 @@ void PaintRow(
|
||||||
: tr::lng_dialogs_text_with_from(
|
: tr::lng_dialogs_text_with_from(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_from_part,
|
lt_from_part,
|
||||||
draftWrapped,
|
std::move(draftWrapped),
|
||||||
lt_message,
|
lt_message,
|
||||||
DialogsPreviewText({
|
DialogsPreviewText({
|
||||||
.text = draft->textWithTags.text,
|
.text = draft->textWithTags.text,
|
||||||
|
@ -476,13 +477,22 @@ void PaintRow(
|
||||||
draft->textWithTags.tags),
|
draft->textWithTags.tags),
|
||||||
}),
|
}),
|
||||||
Text::WithEntities);
|
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{
|
const auto context = Core::MarkedTextContext{
|
||||||
.session = &thread->session(),
|
.session = &thread->session(),
|
||||||
.customEmojiRepaint = customEmojiRepaint,
|
.customEmojiRepaint = customEmojiRepaint,
|
||||||
};
|
};
|
||||||
cache.setMarkedText(
|
cache.setMarkedText(
|
||||||
st::dialogsTextStyle,
|
st::dialogsTextStyle,
|
||||||
draftText,
|
std::move(draftText),
|
||||||
DialogTextOptions(),
|
DialogTextOptions(),
|
||||||
context);
|
context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue