Allow video covers in Saved Messages

This commit is contained in:
Ilya Laktyushin 2025-01-30 12:07:05 +04:00
parent 3ac9d2d9a4
commit 0107ccfe28
2 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,8 @@ public func configureLegacyAssetPicker(_ controller: TGMediaAssetsController, co
controller.reminder = peer.id == context.account.peerId
if let channel = peer as? TelegramChannel, case .broadcast = channel.info {
controller.hasCoverButton = true
} else if peer.id == context.account.peerId {
controller.hasCoverButton = true
}
controller.presentScheduleController = { media, done in
presentSchedulePicker(media, { time in

View File

@ -107,6 +107,8 @@ func presentLegacyMediaPickerGallery(context: AccountContext, peer: EnginePeer?,
var hasCoverButton = false
if case let .channel(channel) = peer, case .broadcast = channel.info {
hasCoverButton = true
} else if peer?.id == context.account.peerId {
hasCoverButton = true
}
let legacyController = LegacyController(presentation: .custom, theme: presentationData.theme, initialLayout: nil)