mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 }};
|
starIconSmall: icon{{ "payments/small_star", windowFg }};
|
||||||
starIconSmallPadding: margins(0px, -2px, 0px, 0px);
|
starIconSmallPadding: margins(0px, -2px, 0px, 0px);
|
||||||
|
|
||||||
|
creditsHistoryEntryTypeAds: icon {{ "folders/folders_channels", premiumButtonFg }};
|
||||||
|
|
|
@ -205,6 +205,8 @@ PaintRoundImageCallback GenerateCreditsPaintUserpicCallback(
|
||||||
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
||||||
case Data::CreditsHistoryEntry::PeerType::PremiumBot:
|
case Data::CreditsHistoryEntry::PeerType::PremiumBot:
|
||||||
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
return { st::historyPeer8UserpicBg, st::historyPeer8UserpicBg2 };
|
||||||
|
case Data::CreditsHistoryEntry::PeerType::Ads:
|
||||||
|
return { st::historyPeer6UserpicBg, st::historyPeer6UserpicBg2 };
|
||||||
case Data::CreditsHistoryEntry::PeerType::Unsupported:
|
case Data::CreditsHistoryEntry::PeerType::Unsupported:
|
||||||
return {
|
return {
|
||||||
st::historyPeerArchiveUserpicBg,
|
st::historyPeerArchiveUserpicBg,
|
||||||
|
@ -227,6 +229,8 @@ PaintRoundImageCallback GenerateCreditsPaintUserpicCallback(
|
||||||
? st::sessionIconAndroid
|
? st::sessionIconAndroid
|
||||||
: (entry.peerType == PeerType::Fragment)
|
: (entry.peerType == PeerType::Fragment)
|
||||||
? st::introFragmentIcon
|
? st::introFragmentIcon
|
||||||
|
: (entry.peerType == PeerType::Ads)
|
||||||
|
? st::creditsHistoryEntryTypeAds
|
||||||
: st::dialogsInaccessibleUserpic).paintInCenter(p, rect);
|
: st::dialogsInaccessibleUserpic).paintInCenter(p, rect);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -442,6 +446,8 @@ Fn<PaintRoundImageCallback(Fn<void()>)> PaintPreviewCallback(
|
||||||
TextWithEntities GenerateEntryName(const Data::CreditsHistoryEntry &entry) {
|
TextWithEntities GenerateEntryName(const Data::CreditsHistoryEntry &entry) {
|
||||||
return ((entry.peerType == Data::CreditsHistoryEntry::PeerType::Fragment)
|
return ((entry.peerType == Data::CreditsHistoryEntry::PeerType::Fragment)
|
||||||
? tr::lng_bot_username_description1_link
|
? 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::lng_credits_summary_history_entry_inner_in)(
|
||||||
tr::now,
|
tr::now,
|
||||||
TextWithEntities::Simple);
|
TextWithEntities::Simple);
|
||||||
|
|
Loading…
Add table
Reference in a new issue