mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Improve paid messages in groups layout.
This commit is contained in:
parent
f9df522b41
commit
19e2642ec1
2 changed files with 13 additions and 5 deletions
|
@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/text/text_options.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/painter.h"
|
||||
#include "core/ui_integration.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "history/history_item_components.h"
|
||||
#include "history/history_item.h"
|
||||
|
@ -433,15 +434,18 @@ void BottomInfo::layoutDateText() {
|
|||
: name.isEmpty()
|
||||
? date
|
||||
: (name + afterAuthor);
|
||||
auto marked = TextWithEntities{ full };
|
||||
auto marked = TextWithEntities();
|
||||
if (const auto count = _data.stars) {
|
||||
marked.append(Ui::Text::IconEmoji(&st::starIconEmoji));
|
||||
marked.append(Lang::FormatCountToShort(count).string);
|
||||
marked.append(
|
||||
Ui::Text::IconEmoji(&st::starIconEmojiSmall)
|
||||
).append(Lang::FormatCountToShort(count).string).append(u", "_q);
|
||||
}
|
||||
marked.append(full);
|
||||
_authorEditedDate.setMarkedText(
|
||||
st::msgDateTextStyle,
|
||||
marked,
|
||||
Ui::NameTextOptions());
|
||||
Ui::NameTextOptions(),
|
||||
Core::TextContext({ .session = &_reactionsOwner->session() }));
|
||||
}
|
||||
|
||||
void BottomInfo::layoutViewsText() {
|
||||
|
@ -606,7 +610,7 @@ BottomInfo::Data BottomInfoDataFromMessage(not_null<Message*> message) {
|
|||
if (item->isSending() || item->hasFailed()) {
|
||||
result.flags |= Flag::Sending;
|
||||
}
|
||||
if (item->out() && !item->history()->peer->isUser()) {
|
||||
if (!item->history()->peer->isUser()) {
|
||||
const auto media = message->media();
|
||||
const auto mine = PaidInformation{
|
||||
.messages = 1,
|
||||
|
|
|
@ -69,6 +69,10 @@ starIconEmoji: IconEmoji {
|
|||
starIconEmojiColored: IconEmoji(starIconEmoji) {
|
||||
useIconColor: true;
|
||||
}
|
||||
starIconEmojiSmall: IconEmoji {
|
||||
icon: icon{{ "chat/mini_stars", creditsBg1 }};
|
||||
padding: margins(0px, 4px, 0px, 0px);
|
||||
}
|
||||
|
||||
creditsHistoryEntryTypeAds: icon {{ "folders/folders_channels", premiumButtonFg }};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue