if let extSignalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: activeAccount.accountId) {
if extSignalingController.isEnabled() {
extSignalingController.leaveRoom(token)
}
}
As a first step we should move the isEnabled() check to the corresponding public methods, so we can write it like
if let extSignalingController = NCSettingsController.sharedInstance().externalSignalingController(forAccountId: activeAccount.accountId) {
extSignalingController.leaveRoom(token)
}
Currently we do something like this:
As a first step we should move the
isEnabled()
check to the corresponding public methods, so we can write it likewe could further simplify the calls, e.g.: