mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
54d084b9ab
@ -1167,21 +1167,30 @@ private final class NativePictureInPictureContentImpl: NSObject, AVPictureInPict
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let (messageId, _) = hiddenMedia {
|
if let (messageId, _) = hiddenMedia {
|
||||||
|
var hadMessage: Bool?
|
||||||
self.messageRemovedDisposable = (context.engine.data.subscribe(TelegramEngine.EngineData.Item.Messages.Message(id: messageId))
|
self.messageRemovedDisposable = (context.engine.data.subscribe(TelegramEngine.EngineData.Item.Messages.Message(id: messageId))
|
||||||
|> map { message -> Bool in
|
|> map { message -> Bool in
|
||||||
if let _ = message {
|
if let _ = message {
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|> filter { $0 }
|
|> deliverOnMainQueue).start(next: { [weak self] value in
|
||||||
|> take(1)
|
guard let self else {
|
||||||
|> deliverOnMainQueue).start(next: { [weak self] _ in
|
|
||||||
guard let strongSelf = self else {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.node.canAttachContent = false
|
if let hadMessage, hadMessage {
|
||||||
|
if value {
|
||||||
|
} else {
|
||||||
|
if let pictureInPictureController = self.pictureInPictureController {
|
||||||
|
pictureInPictureController.stopPictureInPicture()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
hadMessage = value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1847,11 +1856,13 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
var qualityString: String?
|
var qualityString: String?
|
||||||
if case let .quality(quality) = videoQuality {
|
if case let .quality(quality) = videoQuality {
|
||||||
if quality <= 360 {
|
if quality <= 360 {
|
||||||
qualityString = "LD"
|
qualityString = "SD"
|
||||||
} else if quality <= 480 {
|
} else if quality <= 480 {
|
||||||
qualityString = "SD"
|
qualityString = "SD"
|
||||||
} else if quality <= 720 {
|
} else if quality <= 720 {
|
||||||
qualityString = "HD"
|
qualityString = "HD"
|
||||||
|
} else if quality <= 1080 {
|
||||||
|
qualityString = "FHD"
|
||||||
} else {
|
} else {
|
||||||
qualityString = "UHD"
|
qualityString = "UHD"
|
||||||
}
|
}
|
||||||
@ -3499,8 +3510,10 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
qualityTitle = "Medium"
|
qualityTitle = "Medium"
|
||||||
} else if quality <= 720 {
|
} else if quality <= 720 {
|
||||||
qualityTitle = "High"
|
qualityTitle = "High"
|
||||||
|
} else if quality <= 1080 {
|
||||||
|
qualityTitle = "Full HD"
|
||||||
} else {
|
} else {
|
||||||
qualityTitle = "Ultra-High"
|
qualityTitle = "Ultra HD"
|
||||||
}
|
}
|
||||||
items.append(.action(ContextMenuActionItem(text: qualityTitle, textLayout: .secondLineWithValue("\(quality)p"), icon: { _ in
|
items.append(.action(ContextMenuActionItem(text: qualityTitle, textLayout: .secondLineWithValue("\(quality)p"), icon: { _ in
|
||||||
if isSelected {
|
if isSelected {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user