mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-24 14:31:48 +00:00
Temp
This commit is contained in:
parent
d882e72f14
commit
09576bb391
@ -24,10 +24,27 @@ public final class ContextExtractedContentContainingNode: ASDisplayNode {
|
||||
|
||||
self.addSubnode(self.contentNode)
|
||||
}
|
||||
|
||||
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
if self.contentNode.supernode === self {
|
||||
return self.contentNode.hitTest(self.view.convert(point, to: self.contentNode.view), with: event)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final class ContextExtractedContentNode: ASDisplayNode {
|
||||
public var customHitTest: ((CGPoint) -> UIView?)?
|
||||
|
||||
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
let result = self.view.hitTest(point, with: event)
|
||||
if result === self.view {
|
||||
return nil
|
||||
} else {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final class ContextControllerContentNode: ASDisplayNode {
|
||||
|
@ -1852,6 +1852,9 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
} else if participant.muteState?.mutedByYou == true {
|
||||
strongSelf.callContext?.setVolume(ssrc: ssrc, volume: 0.0)
|
||||
}
|
||||
if participant.isVideoMuted {
|
||||
strongSelf.callContext?.removeIncomingVideoSource(ssrc)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,17 @@ private struct BubbleItemAttributes {
|
||||
var neighborSpacing: ChatMessageBubbleRelativePosition.NeighbourSpacing
|
||||
}
|
||||
|
||||
private final class ChatMessageBubbleClippingNode: ASDisplayNode {
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
let result = self.view.hitTest(point, with: event)
|
||||
if result === self.view {
|
||||
return nil
|
||||
} else {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func contentNodeMessagesAndClassesForItem(_ item: ChatMessageItem) -> ([(Message, AnyClass, ChatMessageEntryAttributes, BubbleItemAttributes)], Bool) {
|
||||
var result: [(Message, AnyClass, ChatMessageEntryAttributes, BubbleItemAttributes)] = []
|
||||
var skipText = false
|
||||
@ -367,7 +378,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
||||
private let backgroundWallpaperNode: ChatMessageBubbleBackdrop
|
||||
private let backgroundNode: ChatMessageBackground
|
||||
private let shadowNode: ChatMessageShadowNode
|
||||
private var clippingNode: ASDisplayNode
|
||||
private var clippingNode: ChatMessageBubbleClippingNode
|
||||
|
||||
override var extractedBackgroundNode: ASDisplayNode? {
|
||||
return self.shadowNode
|
||||
@ -431,7 +442,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
||||
self.backgroundNode = ChatMessageBackground()
|
||||
self.shadowNode = ChatMessageShadowNode()
|
||||
|
||||
self.clippingNode = ASDisplayNode()
|
||||
self.clippingNode = ChatMessageBubbleClippingNode()
|
||||
self.clippingNode.clipsToBounds = true
|
||||
|
||||
self.messageAccessibilityArea = AccessibilityAreaNode()
|
||||
|
@ -288,6 +288,10 @@ public final class OngoingGroupCallContext {
|
||||
return ssrc as NSNumber
|
||||
})
|
||||
}
|
||||
|
||||
func removeIncomingVideoSource(_ ssrc: UInt32) {
|
||||
self.context.removeIncomingVideoSource(ssrc)
|
||||
}
|
||||
|
||||
func setVolume(ssrc: UInt32, volume: Double) {
|
||||
self.context.setVolumeForSsrc(ssrc, volume: volume)
|
||||
@ -593,6 +597,12 @@ public final class OngoingGroupCallContext {
|
||||
impl.removeSsrcs(ssrcs: ssrcs)
|
||||
}
|
||||
}
|
||||
|
||||
public func removeIncomingVideoSource(_ ssrc: UInt32) {
|
||||
self.impl.with { impl in
|
||||
impl.removeIncomingVideoSource(ssrc)
|
||||
}
|
||||
}
|
||||
|
||||
public func setVolume(ssrc: UInt32, volume: Double) {
|
||||
self.impl.with { impl in
|
||||
|
@ -20,6 +20,9 @@ objc_library(
|
||||
"tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.*",
|
||||
"tgcalls/tgcalls/platform/darwin/GLVideoViewMac.*",
|
||||
"tgcalls/tgcalls/platform/darwin/ScreenCapturer.*",
|
||||
"tgcalls/tgcalls/platform/darwin/DesktopSharingCapturer.*",
|
||||
"tgcalls/tgcalls/platform/darwin/DesktopCaptureSourceViewMac.*",
|
||||
"tgcalls/tgcalls/platform/darwin/DesktopCaptureSourceView.*",
|
||||
"tgcalls/tgcalls/desktop_capturer/**",
|
||||
]),
|
||||
hdrs = glob([
|
||||
|
@ -205,6 +205,7 @@ typedef NS_ENUM(int32_t, OngoingGroupCallBroadcastPartStatus) {
|
||||
- (void)emitJoinPayload:(void (^ _Nonnull)(NSString * _Nonnull, uint32_t))completion;
|
||||
- (void)setJoinResponsePayload:(NSString * _Nonnull)payload participants:(NSArray<OngoingGroupCallParticipantDescription *> * _Nonnull)participants;
|
||||
- (void)removeSsrcs:(NSArray<NSNumber *> * _Nonnull)ssrcs;
|
||||
- (void)removeIncomingVideoSource:(uint32_t)ssrc;
|
||||
- (void)addParticipants:(NSArray<OngoingGroupCallParticipantDescription *> * _Nonnull)participants;
|
||||
- (void)setIsMuted:(bool)isMuted;
|
||||
- (void)setIsNoiseSuppressionEnabled:(bool)isNoiseSuppressionEnabled;
|
||||
|
@ -1272,6 +1272,12 @@ static void processJoinPayload(tgcalls::GroupJoinPayload &payload, void (^ _Nonn
|
||||
}
|
||||
}
|
||||
|
||||
- (void)removeIncomingVideoSource:(uint32_t)ssrc {
|
||||
if (_instance) {
|
||||
_instance->removeIncomingVideoSource(ssrc);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)parseJsonIntoParticipant:(NSString *)payload participant:(tgcalls::GroupParticipantDescription &)participant {
|
||||
NSData *payloadData = [payload dataUsingEncoding:NSUTF8StringEncoding];
|
||||
if (payloadData == nil) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e83f57813e0dd4b7abb2772f98c86ddf0ed47638
|
||||
Subproject commit 5f5f3a263602841e953faec56edb45cad492241b
|
Loading…
x
Reference in New Issue
Block a user