BugFix: Call button is still visible in production builds #142

The call button is hidden when no call manager is available.
This commit is contained in:
giomfo
2016-03-11 14:45:06 +01:00
parent 23787ce1ef
commit 6c24f9e108
4 changed files with 45 additions and 7 deletions
@@ -56,6 +56,8 @@
// Remove default toolbar background color
self.backgroundColor = [UIColor clearColor];
_supportCallOption = YES;
self.rightInputToolbarButton.hidden = YES;
self.separatorView.backgroundColor = kVectorColorSiver;
@@ -71,6 +73,25 @@
self.placeholder = NSLocalizedStringFromTable(@"room_message_placeholder", @"Vector", nil);
}
- (void)setSupportCallOption:(BOOL)supportCallOption
{
if (_supportCallOption != supportCallOption)
{
_supportCallOption = supportCallOption;
if (supportCallOption)
{
self.voiceCallButtonWidthConstraint.constant = 46;
}
else
{
self.voiceCallButtonWidthConstraint.constant = 0;
}
[self setNeedsUpdateConstraints];
}
}
#pragma mark - HPGrowingTextView delegate
//- (BOOL)growingTextViewShouldReturn:(HPGrowingTextView *)hpGrowingTextView