Fix bugs when rotating from portrait to landscape mode : edit/delete action shown as available for LDAP contacts, or Contact Name appearing despite being currently in edit mode

This commit is contained in:
QuentinArguillere 2022-06-23 12:08:46 +02:00
parent f847d8cfe3
commit 930dd74c89

View file

@ -311,10 +311,13 @@
}
}
if (self.contact != NULL && self.contact.createdFromLdap) {
_editButton.hidden = TRUE;
_deleteButton.hidden = TRUE;
}
_nameLabel.hidden = self.tableController.isEditing;
[self updateBackOrCancelButton];
BOOL isEditing = !self.contact.createdFromLdap && _editButton.hidden;
[self recomputeTableViewSize:isEditing];
[self recomputeTableViewSize:self.tableController.isEditing];
}
- (void)viewWillDisappear:(BOOL)animated {