Fix video speed rate check color

This commit is contained in:
Ilya Laktyushin
2023-03-03 18:34:48 +04:00
parent fb0598b2e0
commit 5eb0d74f40

View File

@@ -2639,13 +2639,12 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
items.append(.separator)
let theme = strongSelf.presentationData.theme
for (text, _, rate) in strongSelf.speedList(strings: strongSelf.presentationData.strings) {
let isSelected = abs(status.baseRate - rate) < 0.01
items.append(.action(ContextMenuActionItem(text: text, icon: { _ in return nil }, iconSource: ContextMenuActionItemIconSource(size: CGSize(width: 24.0, height: 24.0), signal: sliderValuePromise.get()
|> map { value in
if isSelected && value == nil {
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: theme.contextMenu.primaryColor)
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .white)
} else {
return nil
}