@@ -38,9 +38,10 @@ private final class ChannelPermissionsControllerArguments {
3838 let updateSlowmode : ( Int32 ) -> Void
3939 let updateUnrestrictBoosters : ( Int32 ) -> Void
4040 let updateStarsAmount : ( StarsAmount ? , Bool ) -> Void
41+ let openSetCustomStarsAmount : ( ) -> Void
4142 let toggleIsOptionExpanded : ( TelegramChatBannedRightsFlags ) -> Void
4243
43- init ( context: AccountContext , updatePermission: @escaping ( TelegramChatBannedRightsFlags , Bool ) -> Void , setPeerIdWithRevealedOptions: @escaping ( EnginePeer . Id ? , EnginePeer . Id ? ) -> Void , addPeer: @escaping ( ) -> Void , removePeer: @escaping ( EnginePeer . Id ) -> Void , openPeer: @escaping ( ChannelParticipant ) -> Void , openPeerInfo: @escaping ( EnginePeer ) -> Void , openKicked: @escaping ( ) -> Void , presentRestrictedPermissionAlert: @escaping ( TelegramChatBannedRightsFlags ) -> Void , presentConversionToBroadcastGroup: @escaping ( ) -> Void , openChannelExample: @escaping ( ) -> Void , updateSlowmode: @escaping ( Int32 ) -> Void , updateUnrestrictBoosters: @escaping ( Int32 ) -> Void , updateStarsAmount: @escaping ( StarsAmount ? , Bool ) -> Void , toggleIsOptionExpanded: @escaping ( TelegramChatBannedRightsFlags ) -> Void ) {
44+ init ( context: AccountContext , updatePermission: @escaping ( TelegramChatBannedRightsFlags , Bool ) -> Void , setPeerIdWithRevealedOptions: @escaping ( EnginePeer . Id ? , EnginePeer . Id ? ) -> Void , addPeer: @escaping ( ) -> Void , removePeer: @escaping ( EnginePeer . Id ) -> Void , openPeer: @escaping ( ChannelParticipant ) -> Void , openPeerInfo: @escaping ( EnginePeer ) -> Void , openKicked: @escaping ( ) -> Void , presentRestrictedPermissionAlert: @escaping ( TelegramChatBannedRightsFlags ) -> Void , presentConversionToBroadcastGroup: @escaping ( ) -> Void , openChannelExample: @escaping ( ) -> Void , updateSlowmode: @escaping ( Int32 ) -> Void , updateUnrestrictBoosters: @escaping ( Int32 ) -> Void , updateStarsAmount: @escaping ( StarsAmount ? , Bool ) -> Void , openSetCustomStarsAmount : @escaping ( ) -> Void , toggleIsOptionExpanded: @escaping ( TelegramChatBannedRightsFlags ) -> Void ) {
4445 self . context = context
4546 self . updatePermission = updatePermission
4647 self . addPeer = addPeer
@@ -55,6 +56,7 @@ private final class ChannelPermissionsControllerArguments {
5556 self . updateSlowmode = updateSlowmode
5657 self . updateUnrestrictBoosters = updateUnrestrictBoosters
5758 self . updateStarsAmount = updateStarsAmount
59+ self . openSetCustomStarsAmount = openSetCustomStarsAmount
5860 self . toggleIsOptionExpanded = toggleIsOptionExpanded
5961 }
6062}
@@ -427,7 +429,7 @@ private enum ChannelPermissionsEntry: ItemListNodeEntry {
427429 case let . messagePrice( _, value, maxValue, price) :
428430 return MessagePriceItem ( theme: presentationData. theme, strings: presentationData. strings, isEnabled: true , minValue: 1 , maxValue: maxValue, value: value, price: price, sectionId: self . section, updated: { value, apply in
429431 arguments. updateStarsAmount ( StarsAmount ( value: value, nanos: 0 ) , apply)
430- } )
432+ } , openSetCustom : nil )
431433 case let . messagePriceInfo( _, value) :
432434 return ItemListTextItem ( presentationData: presentationData, text: . plain( value) , sectionId: self . section)
433435 case let . unrestrictBoostersSwitch( _, title, value) :
@@ -1267,6 +1269,7 @@ public func channelPermissionsController(context: AccountContext, updatedPresent
12671269 |> deliverOnMainQueue) . start ( ) )
12681270 } )
12691271 }
1272+ } , openSetCustomStarsAmount: {
12701273 } , toggleIsOptionExpanded: { flags in
12711274 updateState { state in
12721275 var state = state
0 commit comments