mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Various improvements
This commit is contained in:
parent
7076cc93a5
commit
1507e99c1d
@ -328,6 +328,14 @@ func openChatMessageImpl(_ params: OpenChatMessageParams) -> Bool {
|
|||||||
|
|
||||||
params.blockInteraction.set(.single(true))
|
params.blockInteraction.set(.single(true))
|
||||||
|
|
||||||
|
var presentInCurrent = false
|
||||||
|
if let channel = params.message.peers[params.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info {
|
||||||
|
if let layout = params.navigationController?.validLayout, case .regular = layout.metrics.widthClass {
|
||||||
|
} else {
|
||||||
|
presentInCurrent = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let _ = (gallery
|
let _ = (gallery
|
||||||
|> deliverOnMainQueue).startStandalone(next: { gallery in
|
|> deliverOnMainQueue).startStandalone(next: { gallery in
|
||||||
params.blockInteraction.set(.single(false))
|
params.blockInteraction.set(.single(false))
|
||||||
@ -344,7 +352,7 @@ func openChatMessageImpl(_ params: OpenChatMessageParams) -> Bool {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
params.present(gallery, arguments, .window(.root))
|
params.present(gallery, arguments, presentInCurrent ? .current : .window(.root))
|
||||||
})
|
})
|
||||||
return true
|
return true
|
||||||
case let .secretGallery(gallery):
|
case let .secretGallery(gallery):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user