@@ -250,7 +250,7 @@ private enum StatsEntry: ItemListNodeEntry {
250250 case adsTonBalanceInfo( PresentationTheme , String )
251251
252252 case adsStarsBalanceTitle( PresentationTheme , String )
253- case adsStarsBalance( PresentationTheme , StarsRevenueStats , Bool , Bool , Int32 ? )
253+ case adsStarsBalance( PresentationTheme , StarsRevenueStats , Bool , Bool , Bool , Int32 ? )
254254 case adsStarsBalanceInfo( PresentationTheme , String )
255255
256256 case earnStarsInfo
@@ -827,8 +827,8 @@ private enum StatsEntry: ItemListNodeEntry {
827827 } else {
828828 return false
829829 }
830- case let . adsStarsBalance( lhsTheme, lhsStats, lhsCanWithdraw, lhsIsEnabled, lhsCooldownUntilTimestamp) :
831- if case let . adsStarsBalance( rhsTheme, rhsStats, rhsCanWithdraw, rhsIsEnabled, rhsCooldownUntilTimestamp) = rhs, lhsTheme === rhsTheme, lhsStats == rhsStats, lhsCanWithdraw == rhsCanWithdraw, lhsIsEnabled == rhsIsEnabled, lhsCooldownUntilTimestamp == rhsCooldownUntilTimestamp {
830+ case let . adsStarsBalance( lhsTheme, lhsStats, lhsCanWithdraw, lhsCanBuyAds , lhsIsEnabled, lhsCooldownUntilTimestamp) :
831+ if case let . adsStarsBalance( rhsTheme, rhsStats, rhsCanWithdraw, rhsCanBuyAds , rhsIsEnabled, rhsCooldownUntilTimestamp) = rhs, lhsTheme === rhsTheme, lhsStats == rhsStats, lhsCanWithdraw == rhsCanWithdraw, lhsCanBuyAds == rhsCanBuyAds , lhsIsEnabled == rhsIsEnabled, lhsCooldownUntilTimestamp == rhsCooldownUntilTimestamp {
832832 return true
833833 } else {
834834 return false
@@ -1108,7 +1108,7 @@ private enum StatsEntry: ItemListNodeEntry {
11081108 return ItemListTextItem ( presentationData: presentationData, text: . markdown( text) , sectionId: self . section, linkAction: { _ in
11091109 arguments. openMonetizationInfo ( )
11101110 } )
1111- case let . adsStarsBalance( _, stats, canWithdraw, isEnabled, cooldownUntilTimestamp) :
1111+ case let . adsStarsBalance( _, stats, canWithdraw, canBuyAds , isEnabled, cooldownUntilTimestamp) :
11121112 return MonetizationBalanceItem (
11131113 context: arguments. context,
11141114 presentationData: presentationData,
@@ -1131,7 +1131,7 @@ private enum StatsEntry: ItemListNodeEntry {
11311131 arguments. requestStarsWithdraw ( )
11321132 }
11331133 } ,
1134- buyAdsAction: canWithdraw ? {
1134+ buyAdsAction: canWithdraw && canBuyAds ? {
11351135 arguments. buyAds ( )
11361136 } : nil ,
11371137 sectionId: self . section,
@@ -1649,7 +1649,7 @@ private func monetizationEntries(
16491649
16501650 if canViewStarsRevenue, let starsData, starsData. balances. overallRevenue > StarsAmount . zero {
16511651 entries. append ( . adsStarsBalanceTitle( presentationData. theme, presentationData. strings. Monetization_StarsBalanceTitle) )
1652- entries. append ( . adsStarsBalance( presentationData. theme, starsData, isCreator && starsData. balances. availableBalance > StarsAmount . zero, starsData. balances. withdrawEnabled, starsData. balances. nextWithdrawalTimestamp) )
1652+ entries. append ( . adsStarsBalance( presentationData. theme, starsData, isCreator && starsData. balances. availableBalance > StarsAmount . zero, !isGroup , starsData. balances. withdrawEnabled, starsData. balances. nextWithdrawalTimestamp) )
16531653 entries. append ( . adsStarsBalanceInfo( presentationData. theme, isGroup ? presentationData. strings. Monetization_Balance_StarsInfoGroup : presentationData. strings. Monetization_Balance_StarsInfo) )
16541654 }
16551655
0 commit comments