mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Add context menu to HomeViewController cells.
This commit is contained in:
@@ -1343,8 +1343,6 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
{
|
||||
if (editedRoomId)
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
// Check whether the user didn't leave the room
|
||||
// TODO: handle multi-account
|
||||
MXRoom *room = [self.mainSession roomWithRoomId:editedRoomId];
|
||||
@@ -1352,34 +1350,32 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
{
|
||||
[self startActivityIndicator];
|
||||
|
||||
MXWeakify(self);
|
||||
|
||||
[room setIsDirect:isDirect withUserId:nil success:^{
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
[self stopActivityIndicator];
|
||||
// Leave editing mode
|
||||
[self cancelEditionMode:isRefreshPending];
|
||||
}
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self stopActivityIndicator];
|
||||
// Leave editing mode
|
||||
[self cancelEditionMode:isRefreshPending];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
[self stopActivityIndicator];
|
||||
|
||||
MXLogDebug(@"[RecentsViewController] Failed to update direct tag of the room (%@)", editedRoomId);
|
||||
|
||||
// Notify the end user
|
||||
NSString *userId = self.mainSession.myUser.userId; // TODO: handle multi-account
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification
|
||||
object:error
|
||||
userInfo:userId ? @{kMXKErrorUserIdKey: userId} : nil];
|
||||
|
||||
// Leave editing mode
|
||||
[self cancelEditionMode:isRefreshPending];
|
||||
}
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self stopActivityIndicator];
|
||||
|
||||
MXLogDebug(@"[RecentsViewController] Failed to update direct tag of the room (%@)", editedRoomId);
|
||||
|
||||
// Notify the end user
|
||||
NSString *userId = self.mainSession.myUser.userId; // TODO: handle multi-account
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kMXKErrorNotification
|
||||
object:error
|
||||
userInfo:userId ? @{kMXKErrorUserIdKey: userId} : nil];
|
||||
|
||||
// Leave editing mode
|
||||
[self cancelEditionMode:isRefreshPending];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user