Skip to content

Instantly share code, notes, and snippets.

@zontan
Created July 6, 2020 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zontan/8ac5bf95c521cdd3280d20d08b444714 to your computer and use it in GitHub Desktop.
Save zontan/8ac5bf95c521cdd3280d20d08b444714 to your computer and use it in GitHub Desktop.
@IBAction func didTapX(_ sender: Any) {
if inCall {
if (isLocalCall) {
//Toggle lock on the room
callLocked = !callLocked
if (callLocked) {
userRef.child("\(currentUser!.uid)/locked").setValue("true")
} else {
userRef.child("\(currentUser!.uid)/locked").setValue("false")
}
} else {
leaveChannel()
if let user = currentUser {
joinChannel(channelName: user.uid)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment