using wekify and strongify macros

This commit is contained in:
Mauro Romito
2025-07-25 12:54:42 +02:00
parent e6842a787a
commit 68b6ea9409
3 changed files with 62 additions and 85 deletions

View File

@@ -245,13 +245,14 @@ Please see LICENSE in the repository root for full details.
{
MXStrongifyAndReturnIfNil(self);
[self addPendingActionMask];
MXWeakify(self);
[self.mxRoom leave:^{
MXStrongifyAndReturnIfNil(self);
[self removePendingActionMask];
[self withdrawViewControllerAnimated:YES completion:nil];
} failure:^(NSError *error) {
MXStrongifyAndReturnIfNil(self);
[self removePendingActionMask];
MXLogDebug(@"[MXKRoomMemberDetailsVC] Leave room %@ failed", self->mxRoom.roomId);
// Notify MatrixKit user