diff --git a/Telegram/Resources/icons/chat/paid_approve.svg b/Telegram/Resources/icons/chat/paid_approve.svg
new file mode 100644
index 0000000000..c122dca22d
--- /dev/null
+++ b/Telegram/Resources/icons/chat/paid_approve.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/Telegram/Resources/icons/chat/paid_decline.svg b/Telegram/Resources/icons/chat/paid_decline.svg
new file mode 100644
index 0000000000..66f52af7ea
--- /dev/null
+++ b/Telegram/Resources/icons/chat/paid_decline.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/Telegram/Resources/icons/chat/paid_edit.svg b/Telegram/Resources/icons/chat/paid_edit.svg
new file mode 100644
index 0000000000..5b4ec4a489
--- /dev/null
+++ b/Telegram/Resources/icons/chat/paid_edit.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/Telegram/SourceFiles/history/history_item_components.cpp b/Telegram/SourceFiles/history/history_item_components.cpp
index 25503abc47..e1a013e786 100644
--- a/Telegram/SourceFiles/history/history_item_components.cpp
+++ b/Telegram/SourceFiles/history/history_item_components.cpp
@@ -759,17 +759,26 @@ ReplyKeyboard::ReplyKeyboard(
for (auto j = 0; j != rowSize; ++j) {
auto button = Button();
using Type = HistoryMessageMarkupButton::Type;
- const auto isBuy = (row[j].type == Type::Buy);
static const auto RegExp = QRegularExpression("\\b"
+ Ui::kCreditsCurrency
+ "\\b");
- const auto text = isBuy
+ const auto type = row[j].type;
+ const auto text = (type == Type::Buy)
? base::duplicate(row[j].text).replace(
RegExp,
QChar(0x2B50))
: row[j].text;
+ const auto withEmoji = [&](const style::IconEmoji &icon) {
+ return Ui::Text::IconEmoji(&icon).append(text);
+ };
const auto textWithEntities = [&] {
- if (!isBuy) {
+ if (type == Type::SuggestAccept) {
+ return withEmoji(st::chatSuggestAcceptIcon);
+ } else if (type == Type::SuggestDecline) {
+ return withEmoji(st::chatSuggestDeclineIcon);
+ } else if (type == Type::SuggestChange) {
+ return withEmoji(st::chatSuggestChangeIcon);
+ } else if (type != Type::Buy) {
return TextWithEntities();
}
auto result = TextWithEntities();
@@ -785,7 +794,7 @@ ReplyKeyboard::ReplyKeyboard(
? TextWithEntities()
: result;
}();
- button.type = row.at(j).type;
+ button.type = type;
button.link = std::make_shared(
owner,
i,
diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style
index ca30c84f1a..e77c9136c0 100644
--- a/Telegram/SourceFiles/ui/chat/chat.style
+++ b/Telegram/SourceFiles/ui/chat/chat.style
@@ -1060,6 +1060,18 @@ chatSuggestInfoLastMargin: margins(16px, 4px, 16px, 16px);
chatSuggestTableMiddleMargin: margins(8px, 4px, 8px, 4px);
chatSuggestTableLastMargin: margins(8px, 4px, 8px, 16px);
chatSuggestInfoFullMargin: margins(16px, 16px, 16px, 16px);
+chatSuggestAcceptIcon: IconEmoji {
+ icon: icon{{ "chat/paid_approve", windowFg }};
+ padding: margins(0px, -2px, 0px, 0px);
+}
+chatSuggestDeclineIcon: IconEmoji {
+ icon: icon{{ "chat/paid_decline", windowFg }};
+ padding: margins(0px, -2px, 0px, 0px);
+}
+chatSuggestChangeIcon: IconEmoji {
+ icon: icon{{ "chat/paid_edit", windowFg }};
+ padding: margins(0px, -2px, 0px, 0px);
+}
premiumRequiredWidth: 186px;
premiumRequiredIcon: icon{{ "chat/large_lockedchat", msgServiceFg }};