mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show a credits emoji in chats list preview.
This commit is contained in:
parent
043e3ae97e
commit
57254ca259
1 changed files with 5 additions and 1 deletions
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_media_types.h"
|
#include "data/data_media_types.h"
|
||||||
|
|
||||||
#include "base/random.h"
|
#include "base/random.h"
|
||||||
|
#include "boxes/send_credits_box.h" // CreditsEmoji.
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "history/history_item.h" // CreateMedia.
|
#include "history/history_item.h" // CreateMedia.
|
||||||
#include "history/history_location_manager.h"
|
#include "history/history_location_manager.h"
|
||||||
|
@ -2066,8 +2067,11 @@ ItemPreview MediaInvoice::toPreview(ToPreviewOptions options) const {
|
||||||
? parent()->translatedText()
|
? parent()->translatedText()
|
||||||
: parent()->originalText();
|
: parent()->originalText();
|
||||||
const auto hasMiniImages = !images.empty();
|
const auto hasMiniImages = !images.empty();
|
||||||
|
auto nice = Ui::Text::Colorized(
|
||||||
|
Ui::CreditsEmoji(&parent()->history()->session()));
|
||||||
|
nice.append(WithCaptionNotificationText(type, caption, hasMiniImages));
|
||||||
return {
|
return {
|
||||||
.text = WithCaptionNotificationText(type, caption, hasMiniImages),
|
.text = std::move(nice),
|
||||||
.images = std::move(images),
|
.images = std::move(images),
|
||||||
.loadingContext = std::move(context),
|
.loadingContext = std::move(context),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue