Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-01-23 20:07:12 +03:00
parent 9a2253d7fd
commit c810233048
22 changed files with 4586 additions and 4314 deletions

View File

@@ -85,6 +85,9 @@ private final class VoiceChatVolumeContextItemNode: ASDisplayNode, ContextMenuCu
let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(self.panGesture(_:)))
self.view.addGestureRecognizer(panGestureRecognizer)
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:)))
self.view.addGestureRecognizer(tapGestureRecognizer)
}
func updateTheme(presentationData: PresentationData) {
@@ -180,4 +183,10 @@ private final class VoiceChatVolumeContextItemNode: ASDisplayNode, ContextMenuCu
break
}
}
@objc private func tapGesture(_ gestureRecognizer: UITapGestureRecognizer) {
let location = gestureRecognizer.location(in: gestureRecognizer.view)
self.value = max(0.0, min(2.0, location.x / self.bounds.width * 2.0))
self.valueChanged(self.value, true)
}
}