@@ -93,7 +93,7 @@ private enum ChannelPermissionsEntry: ItemListNodeEntry {
9393 case chargeForMessagesInfo( PresentationTheme , String )
9494
9595 case messagePriceHeader( PresentationTheme , String )
96- case messagePrice( PresentationTheme , Int64 , String )
96+ case messagePrice( PresentationTheme , Int64 , Int64 , String )
9797 case messagePriceInfo( PresentationTheme , String )
9898
9999 case unrestrictBoostersSwitch( PresentationTheme , String , Bool )
@@ -241,8 +241,8 @@ private enum ChannelPermissionsEntry: ItemListNodeEntry {
241241 } else {
242242 return false
243243 }
244- case let . messagePrice( lhsTheme, lhsValue, lhsPrice) :
245- if case let . messagePrice( rhsTheme, rhsValue, rhsPrice) = rhs, lhsTheme === rhsTheme, lhsValue == rhsValue, lhsPrice == rhsPrice {
244+ case let . messagePrice( lhsTheme, lhsValue, lhsMaxValue , lhsPrice) :
245+ if case let . messagePrice( rhsTheme, rhsValue, rhsMaxValue , rhsPrice) = rhs, lhsTheme === rhsTheme, lhsValue == rhsValue, lhsMaxValue == rhsMaxValue , lhsPrice == rhsPrice {
246246 return true
247247 } else {
248248 return false
@@ -424,8 +424,8 @@ private enum ChannelPermissionsEntry: ItemListNodeEntry {
424424 return ItemListTextItem ( presentationData: presentationData, text: . plain( value) , sectionId: self . section)
425425 case let . messagePriceHeader( _, value) :
426426 return ItemListSectionHeaderItem ( presentationData: presentationData, text: value, sectionId: self . section)
427- case let . messagePrice( _, value, price) :
428- return MessagePriceItem ( theme: presentationData. theme, strings: presentationData. strings, minValue: 1 , maxValue: 10000 , value: value, price: price, sectionId: self . section, updated: { value in
427+ case let . messagePrice( _, value, maxValue , price) :
428+ return MessagePriceItem ( theme: presentationData. theme, strings: presentationData. strings, isEnabled : true , minValue: 1 , maxValue: maxValue , value: value, price: price, sectionId: self . section, updated: { value in
429429 arguments. updateStarsAmount ( StarsAmount ( value: value, nanos: 0 ) )
430430 } )
431431 case let . messagePriceInfo( _, value) :
@@ -733,7 +733,7 @@ private func channelPermissionsControllerEntries(context: AccountContext, presen
733733 price = " ≈ \( formatTonUsdValue ( sendPaidMessageStars, divide: false , rate: usdRate, dateTimeFormat: presentationData. dateTimeFormat) ) "
734734
735735 entries. append ( . messagePriceHeader( presentationData. theme, presentationData. strings. GroupInfo_Permissions_MessagePrice) )
736- entries. append ( . messagePrice( presentationData. theme, sendPaidMessageStars, price) )
736+ entries. append ( . messagePrice( presentationData. theme, sendPaidMessageStars, configuration . paidMessageMaxAmount , price) )
737737 entries. append ( . messagePriceInfo( presentationData. theme, presentationData. strings. GroupInfo_Permissions_MessagePriceInfo ( " \( configuration. paidMessageCommissionPermille / 10 ) " , price) . string) )
738738 }
739739 }
0 commit comments