mirror of
https://github.com/snikket-im/snikket-ios.git
synced 2025-10-26 11:18:09 +00:00
ChatViewController: Always show audio call button
For more context, see https://github.com/snikket-im/snikket-server/issues/86
This commit is contained in:
parent
20049ffc24
commit
e2c0004c0c
@ -377,7 +377,8 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
||||
#if targetEnvironment(simulator)
|
||||
#else
|
||||
let jingleSupported = CallManager.isAvailable ? JingleManager.instance.support(for: JID(self.jid), on: self.account) : [];
|
||||
var count = jingleSupported.contains(.audio) ? 1 : 0;
|
||||
let alwaysShowAudio = true // TODO: Make this configurable (at build or runtime?)
|
||||
var count = (alwaysShowAudio || jingleSupported.contains(.audio)) ? 1 : 0;
|
||||
if jingleSupported.contains(.video) {
|
||||
count = count + 1;
|
||||
}
|
||||
@ -390,7 +391,7 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
|
||||
//buttons.append(UIBarButtonItem(image: UIImage(named: "videoCall"), style: .plain, target: self, action: #selector(self.videoCall)));
|
||||
buttons.append(self.smallBarButtonItem(image: UIImage(named: "videoCall")!, action: #selector(self.videoCall)));
|
||||
}
|
||||
if jingleSupported.contains(.audio) {
|
||||
if alwaysShowAudio || jingleSupported.contains(.audio) {
|
||||
//buttons.append(UIBarButtonItem(image: UIImage(named: "audioCall"), style: .plain, target: self, action: #selector(self.audioCall)));
|
||||
buttons.append(self.smallBarButtonItem(image: UIImage(named: "audioCall")!, action: #selector(self.audioCall)));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user