mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +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_options.h"
|
||||||
#include "ui/text/text_utilities.h"
|
#include "ui/text/text_utilities.h"
|
||||||
#include "ui/painter.h"
|
#include "ui/painter.h"
|
||||||
|
#include "core/ui_integration.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "history/history_item_components.h"
|
#include "history/history_item_components.h"
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
|
@ -433,15 +434,18 @@ void BottomInfo::layoutDateText() {
|
||||||
: name.isEmpty()
|
: name.isEmpty()
|
||||||
? date
|
? date
|
||||||
: (name + afterAuthor);
|
: (name + afterAuthor);
|
||||||
auto marked = TextWithEntities{ full };
|
auto marked = TextWithEntities();
|
||||||
if (const auto count = _data.stars) {
|
if (const auto count = _data.stars) {
|
||||||
marked.append(Ui::Text::IconEmoji(&st::starIconEmoji));
|
marked.append(
|
||||||
marked.append(Lang::FormatCountToShort(count).string);
|
Ui::Text::IconEmoji(&st::starIconEmojiSmall)
|
||||||
|
).append(Lang::FormatCountToShort(count).string).append(u", "_q);
|
||||||
}
|
}
|
||||||
|
marked.append(full);
|
||||||
_authorEditedDate.setMarkedText(
|
_authorEditedDate.setMarkedText(
|
||||||
st::msgDateTextStyle,
|
st::msgDateTextStyle,
|
||||||
marked,
|
marked,
|
||||||
Ui::NameTextOptions());
|
Ui::NameTextOptions(),
|
||||||
|
Core::TextContext({ .session = &_reactionsOwner->session() }));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BottomInfo::layoutViewsText() {
|
void BottomInfo::layoutViewsText() {
|
||||||
|
@ -606,7 +610,7 @@ BottomInfo::Data BottomInfoDataFromMessage(not_null<Message*> message) {
|
||||||
if (item->isSending() || item->hasFailed()) {
|
if (item->isSending() || item->hasFailed()) {
|
||||||
result.flags |= Flag::Sending;
|
result.flags |= Flag::Sending;
|
||||||
}
|
}
|
||||||
if (item->out() && !item->history()->peer->isUser()) {
|
if (!item->history()->peer->isUser()) {
|
||||||
const auto media = message->media();
|
const auto media = message->media();
|
||||||
const auto mine = PaidInformation{
|
const auto mine = PaidInformation{
|
||||||
.messages = 1,
|
.messages = 1,
|
||||||
|
|
|
@ -69,6 +69,10 @@ starIconEmoji: IconEmoji {
|
||||||
starIconEmojiColored: IconEmoji(starIconEmoji) {
|
starIconEmojiColored: IconEmoji(starIconEmoji) {
|
||||||
useIconColor: true;
|
useIconColor: true;
|
||||||
}
|
}
|
||||||
|
starIconEmojiSmall: IconEmoji {
|
||||||
|
icon: icon{{ "chat/mini_stars", creditsBg1 }};
|
||||||
|
padding: margins(0px, 4px, 0px, 0px);
|
||||||
|
}
|
||||||
|
|
||||||
creditsHistoryEntryTypeAds: icon {{ "folders/folders_channels", premiumButtonFg }};
|
creditsHistoryEntryTypeAds: icon {{ "folders/folders_channels", premiumButtonFg }};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue