@@ -586,11 +586,11 @@ class ChannelInfoArguments : PeerInfoArguments {
586
586
587
587
}
588
588
589
- func stats( _ datacenterId: Int32 , monetization: Bool ) {
589
+ func stats( _ datacenterId: Int32 , monetization: Bool , stars : Bool ) {
590
590
if datacenterId == 0 {
591
591
self . pushViewController ( ChannelBoostStatsController ( context: context, peerId: peerId) )
592
592
} else {
593
- self . pushViewController ( ChannelStatsSegmentController ( context, peerId: peerId, isChannel: true , monetization: monetization) )
593
+ self . pushViewController ( ChannelStatsSegmentController ( context, peerId: peerId, isChannel: true , monetization: monetization, stars : stars ) )
594
594
}
595
595
}
596
596
func share( ) {
@@ -691,7 +691,7 @@ enum ChannelInfoEntry: PeerInfoEntry {
691
691
case requests( section: ChannelInfoSection , count: Int32 , viewType: GeneralViewType )
692
692
case reactions( section: ChannelInfoSection , text: String , allowedReactions: PeerAllowedReactions ? , availableReactions: AvailableReactions ? , reactionsCount: Int32 ? , viewType: GeneralViewType )
693
693
case color( section: ChannelInfoSection , peer: PeerEquatable , viewType: GeneralViewType )
694
- case stats( section: ChannelInfoSection , datacenterId: Int32 , monetization: Bool , viewType: GeneralViewType )
694
+ case stats( section: ChannelInfoSection , datacenterId: Int32 , monetization: Bool , stars : Bool , viewType: GeneralViewType )
695
695
case discussion( sectionId: ChannelInfoSection , group: Peer ? , participantsCount: Int32 ? , viewType: GeneralViewType )
696
696
case discussionDesc( sectionId: ChannelInfoSection , viewType: GeneralViewType )
697
697
case aboutInput( sectionId: ChannelInfoSection , description: String , viewType: GeneralViewType )
@@ -722,7 +722,7 @@ enum ChannelInfoEntry: PeerInfoEntry {
722
722
case let . discussion( sectionId, group, participantsCount, _) : return . discussion( sectionId: sectionId, group: group, participantsCount: participantsCount, viewType: viewType)
723
723
case let . reactions( section, text, allowedReactions, availableReactions, reactionsCount, _) : return . reactions( section: section, text: text, allowedReactions: allowedReactions, availableReactions: availableReactions, reactionsCount: reactionsCount, viewType: viewType)
724
724
case let . color( section, peer, _) : return . color( section: section, peer: peer, viewType: viewType)
725
- case let . stats( section, datacenterId, monetization, _) : return . stats( section: section, datacenterId: datacenterId, monetization: monetization, viewType: viewType)
725
+ case let . stats( section, datacenterId, monetization, stars , _) : return . stats( section: section, datacenterId: datacenterId, monetization: monetization, stars : stars , viewType: viewType)
726
726
case let . discussionDesc( sectionId, _) : return . discussionDesc( sectionId: sectionId, viewType: viewType)
727
727
case let . aboutInput( sectionId, description, _) : return . aboutInput( sectionId: sectionId, description: description, viewType: viewType)
728
728
case let . aboutDesc( sectionId, _) : return . aboutDesc( sectionId: sectionId, viewType: viewType)
@@ -888,8 +888,8 @@ enum ChannelInfoEntry: PeerInfoEntry {
888
888
} else {
889
889
return false
890
890
}
891
- case let . stats( sectionId, datacenterId, monetization, viewType) :
892
- if case . stats( sectionId, datacenterId, monetization, viewType) = entry {
891
+ case let . stats( sectionId, datacenterId, monetization, stars , viewType) :
892
+ if case . stats( sectionId, datacenterId, monetization, stars , viewType) = entry {
893
893
return true
894
894
} else {
895
895
return false
@@ -1039,7 +1039,7 @@ enum ChannelInfoEntry: PeerInfoEntry {
1039
1039
return sectionId. rawValue
1040
1040
case let . color( sectionId, _, _) :
1041
1041
return sectionId. rawValue
1042
- case let . stats( sectionId, _, _, _) :
1042
+ case let . stats( sectionId, _, _, _, _ ) :
1043
1043
return sectionId. rawValue
1044
1044
case let . discussionDesc( sectionId, _) :
1045
1045
return sectionId. rawValue
@@ -1096,7 +1096,7 @@ enum ChannelInfoEntry: PeerInfoEntry {
1096
1096
return ( sectionId. rawValue * 1000 ) + stableIndex
1097
1097
case let . color( sectionId, _, _) :
1098
1098
return ( sectionId. rawValue * 1000 ) + stableIndex
1099
- case let . stats( sectionId, _, _, _) :
1099
+ case let . stats( sectionId, _, _, _, _ ) :
1100
1100
return ( sectionId. rawValue * 1000 ) + stableIndex
1101
1101
case let . discussionDesc( sectionId, _) :
1102
1102
return ( sectionId. rawValue * 1000 ) + stableIndex
@@ -1214,9 +1214,9 @@ enum ChannelInfoEntry: PeerInfoEntry {
1214
1214
return GeneralInteractedRowItem ( initialSize, stableId: stableId. hashValue, name: strings ( ) . peerInfoChannelAppearance, icon: theme. icons. profile_channel_color, type: . imageContext( generateSettingsMenuPeerColorsLabelIcon ( peer: peer. peer, context: arguments. context) , " " ) , viewType: viewType, action: {
1215
1215
arguments. openNameColor ( peer: peer. peer)
1216
1216
} , afterNameImage: level == 0 ? generateDisclosureActionBoostLevelBadgeImage ( text: strings ( ) . boostBadgeLevelPLus ( 1 ) ) : nil )
1217
- case let . stats( _, datacenterId, monetization, viewType) :
1217
+ case let . stats( _, datacenterId, monetization, stars , viewType) :
1218
1218
return GeneralInteractedRowItem ( initialSize, stableId: stableId. hashValue, name: strings ( ) . peerInfoStatAndBoosts, icon: theme. icons. profile_channel_stats, type: . next, viewType: viewType, action: {
1219
- arguments. stats ( datacenterId, monetization: monetization)
1219
+ arguments. stats ( datacenterId, monetization: monetization, stars : stars )
1220
1220
} )
1221
1221
case let . setTitle( _, text, viewType) :
1222
1222
return InputDataRowItem ( initialSize, stableId: stableId. hashValue, mode: . plain, error: nil , viewType: viewType, currentText: text, placeholder: nil , inputPlaceholder: strings ( ) . peerInfoChannelTitlePleceholder, filter: { $0 } , updated: arguments. updateEditingName, limit: 255 )
@@ -1405,7 +1405,7 @@ func channelInfoEntries(view: PeerView, arguments:PeerInfoArguments, mediaTabsDa
1405
1405
entries. append ( . members( sectionId: . manage, count: membersCount, viewType: . innerItem) )
1406
1406
1407
1407
if let cachedData = view. cachedData as? CachedChannelData , cachedData. flags. contains ( . canViewStats) {
1408
- entries. append ( . stats( section: . manage, datacenterId: cachedData. statsDatacenterId, monetization: cachedData. flags. contains ( . canViewRevenue) , viewType: . innerItem) )
1408
+ entries. append ( . stats( section: . manage, datacenterId: cachedData. statsDatacenterId, monetization: cachedData. flags. contains ( . canViewRevenue) , stars : cachedData . flags . contains ( . canViewStarsRevenue ) , viewType: . innerItem) )
1409
1409
}
1410
1410
1411
1411
entries. append ( . blocked( sectionId: . manage, count: blockedCount, viewType: . innerItem) )
0 commit comments