mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
MESSENGER-5791 disable save button if textfield is empty
This commit is contained in:
@@ -1620,12 +1620,31 @@
|
||||
|
||||
bwiUserLabelButton = functionCell.mxkButton;
|
||||
|
||||
[bwiUserLabelTextField addTarget:self action:@selector(bwiUserLabelTextFieldDidChange) forControlEvents:UIControlEventEditingChanged];
|
||||
|
||||
// disable bwiUserLabelButton if needed
|
||||
[self bwiUserLabelTextFieldDidChange];
|
||||
|
||||
[self updateUserLabelButtonText];
|
||||
[self updateUserLabelTheme];
|
||||
|
||||
return functionCell;
|
||||
}
|
||||
|
||||
// bwi: #5791 disable save button if textfield is empty
|
||||
- (void)bwiUserLabelTextFieldDidChange
|
||||
{
|
||||
NSString* permFunction = [self.bwiUserLabelService getUserLabelWithUser:self.mxRoomMember.userId];
|
||||
if ([bwiUserLabelTextField hasText] || permFunction)
|
||||
{
|
||||
bwiUserLabelButton.enabled = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
bwiUserLabelButton.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onBwiUserLabelButtonPressed:(id)sender {
|
||||
NSString* permFunction = [self.bwiUserLabelService getUserLabelWithUser:self.mxRoomMember.userId];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user