Various fixes

This commit is contained in:
Ilya Laktyushin
2024-06-28 05:38:53 +04:00
parent 5659120fa9
commit 8e8f997021
7 changed files with 158 additions and 47 deletions

View File

@@ -1166,6 +1166,10 @@ extension ChatControllerImpl {
if case .scheduledMessages = self.presentationInterfaceState.subject {
isScheduledMessages = true
}
var paidMediaAllowed = false
if let cachedData = self.peerView?.cachedData as? CachedChannelData, cachedData.flags.contains(.paidMediaAllowed) {
paidMediaAllowed = true
}
let controller = MediaPickerScreen(
context: self.context,
updatedPresentationData: self.updatedPresentationData,
@@ -1176,6 +1180,7 @@ extension ChatControllerImpl {
bannedSendPhotos: bannedSendPhotos,
bannedSendVideos: bannedSendVideos,
canBoostToUnrestrict: (self.presentationInterfaceState.boostsToUnrestrict ?? 0) > 0 && bannedSendPhotos?.1 != true && bannedSendVideos?.1 != true,
paidMediaAllowed: paidMediaAllowed,
subject: subject,
saveEditedPhotos: saveEditedPhotos
)