mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed support type of credits history entry for ads in earn section.
This commit is contained in:
parent
054a6db3ae
commit
66d6b461f3
2 changed files with 8 additions and 0 deletions
|
@ -47,3 +47,5 @@ creditsBoxButtonLabel: FlatLabel(defaultFlatLabel) {
|
|||
|
||||
starIconSmall: icon{{ "payments/small_star", windowFg }};
|
||||
starIconSmallPadding: margins(0px, -2px, 0px, 0px);
|
||||
|
||||
creditsHistoryEntryTypeAds: icon {{ "folders/folders_channels", premiumButtonFg }};
|
||||
|
|
|
@ -205,6 +205,8 @@ PaintRoundImageCallback GenerateCreditsPaintUserpicCallback(
|
|||
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
||||
case Data::CreditsHistoryEntry::PeerType::PremiumBot:
|
||||
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
||||
case Data::CreditsHistoryEntry::PeerType::Ads:
|
||||
return { st::historyPeer6UserpicBg, st::historyPeer6UserpicBg2 };
|
||||
case Data::CreditsHistoryEntry::PeerType::Unsupported:
|
||||
return {
|
||||
st::historyPeerArchiveUserpicBg,
|
||||
|
@ -227,6 +229,8 @@ PaintRoundImageCallback GenerateCreditsPaintUserpicCallback(
|
|||
? st::sessionIconAndroid
|
||||
: (entry.peerType == PeerType::Fragment)
|
||||
? st::introFragmentIcon
|
||||
: (entry.peerType == PeerType::Ads)
|
||||
? st::creditsHistoryEntryTypeAds
|
||||
: st::dialogsInaccessibleUserpic).paintInCenter(p, rect);
|
||||
};
|
||||
}
|
||||
|
@ -442,6 +446,8 @@ Fn<PaintRoundImageCallback(Fn<void()>)> PaintPreviewCallback(
|
|||
TextWithEntities GenerateEntryName(const Data::CreditsHistoryEntry &entry) {
|
||||
return ((entry.peerType == Data::CreditsHistoryEntry::PeerType::Fragment)
|
||||
? tr::lng_bot_username_description1_link
|
||||
: (entry.peerType == Data::CreditsHistoryEntry::PeerType::Ads)
|
||||
? tr::lng_credits_box_history_entry_ads
|
||||
: tr::lng_credits_summary_history_entry_inner_in)(
|
||||
tr::now,
|
||||
TextWithEntities::Simple);
|
||||
|
|
Loading…
Add table
Reference in a new issue