@@ -653,6 +653,7 @@ public enum ChatListSearchFilter: Equatable {
653653 case files
654654 case music
655655 case voice
656+ case instantVideo
656657 case peer( PeerId , Bool , String , String )
657658 case date( Int32 ? , Int32 , String )
658659 case publicPosts
@@ -679,8 +680,10 @@ public enum ChatListSearchFilter: Equatable {
679680 return 8
680681 case . voice:
681682 return 9
682- case . publicPosts :
683+ case . instantVideo :
683684 return 10
685+ case . publicPosts:
686+ return 11
684687 case let . peer( peerId, _, _, _) :
685688 return peerId. id. _internalGetInt64Value ( )
686689 case let . date( _, date, _) :
@@ -806,7 +809,7 @@ public protocol MediaEditorScreenResult {
806809public protocol TelegramRootControllerInterface : NavigationController {
807810 @discardableResult
808811 func openStoryCamera( customTarget: Stories . PendingTarget ? , transitionIn: StoryCameraTransitionIn ? , transitionedIn: @escaping ( ) -> Void , transitionOut: @escaping ( Stories . PendingTarget ? , Bool ) -> StoryCameraTransitionOut ? ) -> StoryCameraTransitionInCoordinator ?
809- func proceedWithStoryUpload( target: Stories . PendingTarget , result : MediaEditorScreenResult , existingMedia: EngineMedia ? , forwardInfo: Stories . PendingForwardInfo ? , externalState: MediaEditorTransitionOutExternalState , commit: @escaping ( @escaping ( ) -> Void ) -> Void )
812+ func proceedWithStoryUpload( target: Stories . PendingTarget , results : [ MediaEditorScreenResult ] , existingMedia: EngineMedia ? , forwardInfo: Stories . PendingForwardInfo ? , externalState: MediaEditorTransitionOutExternalState , commit: @escaping ( @escaping ( ) -> Void ) -> Void )
810813
811814 func getContactsController( ) -> ViewController ?
812815 func getChatsController( ) -> ViewController ?
@@ -1133,6 +1136,7 @@ public protocol SharedAccountContext: AnyObject {
11331136 func makeStarsGiftController( context: AccountContext , birthdays: [ EnginePeer . Id : TelegramBirthday ] ? , completion: @escaping ( ( [ EnginePeer . Id ] ) -> Void ) ) -> ViewController
11341137 func makePremiumGiftController( context: AccountContext , source: PremiumGiftSource , completion: ( ( [ EnginePeer . Id ] ) -> Signal < Never , TransferStarGiftError > ) ? ) -> ViewController
11351138 func makeGiftOptionsController( context: AccountContext , peerId: EnginePeer . Id , premiumOptions: [ CachedPremiumGiftOption ] , hasBirthday: Bool , completion: ( ( ) -> Void ) ? ) -> ViewController
1139+ func makeGiftStoreController( context: AccountContext , peerId: EnginePeer . Id , gift: StarGift . Gift ) -> ViewController
11361140 func makePremiumPrivacyControllerController( context: AccountContext , subject: PremiumPrivacySubject , peerId: EnginePeer . Id ) -> ViewController
11371141 func makePremiumBoostLevelsController( context: AccountContext , peerId: EnginePeer . Id , subject: BoostSubject , boostStatus: ChannelBoostStatus , myBoostStatus: MyBoostStatus , forceDark: Bool , openStats: ( ( ) -> Void ) ? ) -> ViewController
11381142
@@ -1150,7 +1154,7 @@ public protocol SharedAccountContext: AnyObject {
11501154
11511155 func makeAvatarMediaPickerScreen( context: AccountContext , getSourceRect: @escaping ( ) -> CGRect ? , canDelete: Bool , performDelete: @escaping ( ) -> Void , completion: @escaping ( Any ? , UIView ? , CGRect , UIImage ? , Bool , @escaping ( Bool ? ) -> ( UIView , CGRect ) ? , @escaping ( ) -> Void ) -> Void , dismissed: @escaping ( ) -> Void ) -> ViewController
11521156
1153- func makeStoryMediaPickerScreen( context: AccountContext , isDark: Bool , forCollage: Bool , selectionLimit: Int ? , getSourceRect: @escaping ( ) -> CGRect , completion: @escaping ( Any , UIView , CGRect , UIImage ? , @escaping ( Bool ? ) -> ( UIView , CGRect ) ? , @escaping ( ) -> Void ) -> Void , multipleCompletion: @escaping ( [ Any ] ) -> Void , dismissed: @escaping ( ) -> Void , groupsPresented: @escaping ( ) -> Void ) -> ViewController
1157+ func makeStoryMediaPickerScreen( context: AccountContext , isDark: Bool , forCollage: Bool , selectionLimit: Int ? , getSourceRect: @escaping ( ) -> CGRect , completion: @escaping ( Any , UIView , CGRect , UIImage ? , @escaping ( Bool ? ) -> ( UIView , CGRect ) ? , @escaping ( ) -> Void ) -> Void , multipleCompletion: @escaping ( [ Any ] , Bool ) -> Void , dismissed: @escaping ( ) -> Void , groupsPresented: @escaping ( ) -> Void ) -> ViewController
11541158
11551159 func makeStickerPickerScreen( context: AccountContext , inputData: Promise < StickerPickerInput > , completion: @escaping ( FileMediaReference ) -> Void ) -> ViewController
11561160
@@ -1176,6 +1180,7 @@ public protocol SharedAccountContext: AnyObject {
11761180 func makeStarsAmountScreen( context: AccountContext , initialValue: Int64 ? , completion: @escaping ( Int64 ) -> Void ) -> ViewController
11771181 func makeStarsWithdrawalScreen( context: AccountContext , stats: StarsRevenueStats , completion: @escaping ( Int64 ) -> Void ) -> ViewController
11781182 func makeStarsWithdrawalScreen( context: AccountContext , completion: @escaping ( Int64 ) -> Void ) -> ViewController
1183+ func makeStarGiftResellScreen( context: AccountContext , update: Bool , completion: @escaping ( Int64 ) -> Void ) -> ViewController
11791184 func makeStarsGiftScreen( context: AccountContext , message: EngineMessage ) -> ViewController
11801185 func makeStarsGiveawayBoostScreen( context: AccountContext , peerId: EnginePeer . Id , boost: ChannelBoostersContext . State . Boost ) -> ViewController
11811186 func makeStarsIntroScreen( context: AccountContext ) -> ViewController
@@ -1445,7 +1450,10 @@ public struct StarsSubscriptionConfiguration {
14451450 usdWithdrawRate: 1200 ,
14461451 paidMessageMaxAmount: 10000 ,
14471452 paidMessageCommissionPermille: 850 ,
1448- paidMessagesAvailable: false
1453+ paidMessagesAvailable: false ,
1454+ starGiftResaleMinAmount: 125 ,
1455+ starGiftResaleMaxAmount: 3500 ,
1456+ starGiftCommissionPermille: 80
14491457 )
14501458 }
14511459
@@ -1454,19 +1462,28 @@ public struct StarsSubscriptionConfiguration {
14541462 public let paidMessageMaxAmount : Int64
14551463 public let paidMessageCommissionPermille : Int32
14561464 public let paidMessagesAvailable : Bool
1465+ public let starGiftResaleMinAmount : Int64
1466+ public let starGiftResaleMaxAmount : Int64
1467+ public let starGiftCommissionPermille : Int32
14571468
14581469 fileprivate init (
14591470 maxFee: Int64 ,
14601471 usdWithdrawRate: Int64 ,
14611472 paidMessageMaxAmount: Int64 ,
14621473 paidMessageCommissionPermille: Int32 ,
1463- paidMessagesAvailable: Bool
1474+ paidMessagesAvailable: Bool ,
1475+ starGiftResaleMinAmount: Int64 ,
1476+ starGiftResaleMaxAmount: Int64 ,
1477+ starGiftCommissionPermille: Int32
14641478 ) {
14651479 self . maxFee = maxFee
14661480 self . usdWithdrawRate = usdWithdrawRate
14671481 self . paidMessageMaxAmount = paidMessageMaxAmount
14681482 self . paidMessageCommissionPermille = paidMessageCommissionPermille
14691483 self . paidMessagesAvailable = paidMessagesAvailable
1484+ self . starGiftResaleMinAmount = starGiftResaleMinAmount
1485+ self . starGiftResaleMaxAmount = starGiftResaleMaxAmount
1486+ self . starGiftCommissionPermille = starGiftCommissionPermille
14701487 }
14711488
14721489 public static func with( appConfiguration: AppConfiguration ) -> StarsSubscriptionConfiguration {
@@ -1476,13 +1493,19 @@ public struct StarsSubscriptionConfiguration {
14761493 let paidMessageMaxAmount = ( data [ " stars_paid_message_amount_max " ] as? Double ) . flatMap ( Int64 . init) ?? StarsSubscriptionConfiguration . defaultValue. paidMessageMaxAmount
14771494 let paidMessageCommissionPermille = ( data [ " stars_paid_message_commission_permille " ] as? Double ) . flatMap ( Int32 . init) ?? StarsSubscriptionConfiguration . defaultValue. paidMessageCommissionPermille
14781495 let paidMessagesAvailable = ( data [ " stars_paid_messages_available " ] as? Bool ) ?? StarsSubscriptionConfiguration . defaultValue. paidMessagesAvailable
1496+ let starGiftResaleMinAmount = ( data [ " stars_stargift_resale_amount_min " ] as? Double ) . flatMap ( Int64 . init) ?? StarsSubscriptionConfiguration . defaultValue. starGiftResaleMinAmount
1497+ let starGiftResaleMaxAmount = ( data [ " stars_stargift_resale_amount_max " ] as? Double ) . flatMap ( Int64 . init) ?? StarsSubscriptionConfiguration . defaultValue. starGiftResaleMaxAmount
1498+ let starGiftCommissionPermille = ( data [ " stars_stargift_resale_commission_permille " ] as? Double ) . flatMap ( Int32 . init) ?? StarsSubscriptionConfiguration . defaultValue. starGiftCommissionPermille
14791499
14801500 return StarsSubscriptionConfiguration (
14811501 maxFee: maxFee,
14821502 usdWithdrawRate: usdWithdrawRate,
14831503 paidMessageMaxAmount: paidMessageMaxAmount,
14841504 paidMessageCommissionPermille: paidMessageCommissionPermille,
1485- paidMessagesAvailable: paidMessagesAvailable
1505+ paidMessagesAvailable: paidMessagesAvailable,
1506+ starGiftResaleMinAmount: starGiftResaleMinAmount,
1507+ starGiftResaleMaxAmount: starGiftResaleMaxAmount,
1508+ starGiftCommissionPermille: starGiftCommissionPermille
14861509 )
14871510 } else {
14881511 return . defaultValue
0 commit comments