mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Group call optimizations
This commit is contained in:
@@ -2452,6 +2452,24 @@ public final class VoiceChatControllerImpl: ViewController, VoiceChatController
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var lastTimestamp = 0.0
|
||||
self.call.onMutedSpeechActivityDetected = { [weak self] value in
|
||||
Queue.mainQueue().async {
|
||||
guard let self, value else {
|
||||
return
|
||||
}
|
||||
let timestamp = CFAbsoluteTimeGetCurrent()
|
||||
if lastTimestamp + 1000.0 < timestamp {
|
||||
lastTimestamp = timestamp
|
||||
|
||||
//TODO:localize
|
||||
self.presentUndoOverlay(content: .info(title: nil, text: "Your microphone is muted.", timeout: nil, customUndoText: nil), action: { _ in
|
||||
return false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deinit {
|
||||
|
||||
Reference in New Issue
Block a user