mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Renaming: [MXSession room:] to [MXSession roomWithRoomId:]. [MXSession user:] to [MXSession userWithUserId:]
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
} else {
|
||||
// Get the user that corresponds to this member
|
||||
MatrixHandler *mxHandler = [MatrixHandler sharedHandler];
|
||||
MXUser *user = [mxHandler.mxSession user:roomMember.userId];
|
||||
MXUser *user = [mxHandler.mxSession userWithUserId:roomMember.userId];
|
||||
|
||||
// Prepare last active ago string
|
||||
NSUInteger lastActiveAgoInSec = user.lastActiveAgo / 1000;
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
// Check whether the user has already joined the selected public room
|
||||
MXPublicRoom *publicRoom = [publicRooms objectAtIndex:indexPath.row];
|
||||
if ([mxHandler.mxSession room:publicRoom.roomId]) {
|
||||
if ([mxHandler.mxSession roomWithRoomId:publicRoom.roomId]) {
|
||||
// Open selected room
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoom:publicRoom.roomId];
|
||||
} else {
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
MXEvent *mxEvent = recents[indexPath.row];
|
||||
MatrixHandler *mxHandler = [MatrixHandler sharedHandler];
|
||||
MXRoom *mxRoom = [mxHandler.mxSession room:mxEvent.roomId];
|
||||
MXRoom *mxRoom = [mxHandler.mxSession roomWithRoomId:mxEvent.roomId];
|
||||
|
||||
cell.roomTitle.text = [mxRoom.state displayname];
|
||||
cell.lastEventDescription.text = [mxHandler displayTextForEvent:mxEvent withRoomState:mxRoom.state inSubtitleMode:YES];
|
||||
@@ -296,7 +296,7 @@
|
||||
if (editingStyle == UITableViewCellEditingStyleDelete) {
|
||||
// Leave the selected room
|
||||
MXEvent *mxEvent = recents[indexPath.row];
|
||||
MXRoom *mxRoom = [[MatrixHandler sharedHandler].mxSession room:mxEvent.roomId];
|
||||
MXRoom *mxRoom = [[MatrixHandler sharedHandler].mxSession roomWithRoomId:mxEvent.roomId];
|
||||
[mxRoom leave:^{
|
||||
// Refresh table display
|
||||
[recents removeObjectAtIndex:indexPath.row];
|
||||
|
||||
@@ -249,7 +249,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
// Update room data
|
||||
if (self.roomId) {
|
||||
MatrixHandler *mxHandler = [MatrixHandler sharedHandler];
|
||||
mxRoom = [mxHandler.mxSession room:self.roomId];
|
||||
mxRoom = [mxHandler.mxSession roomWithRoomId:self.roomId];
|
||||
|
||||
// Update room title
|
||||
self.roomNameTextField.text = mxRoom.state.displayname;
|
||||
@@ -540,8 +540,8 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
if ([[AppSettings sharedSettings] sortMembersUsingLastSeenTime]) {
|
||||
// Get the users that correspond to these members
|
||||
MatrixHandler *mxHandler = [MatrixHandler sharedHandler];
|
||||
MXUser *user1 = [mxHandler.mxSession user:member1.userId];
|
||||
MXUser *user2 = [mxHandler.mxSession user:member2.userId];
|
||||
MXUser *user1 = [mxHandler.mxSession userWithUserId:member1.userId];
|
||||
MXUser *user2 = [mxHandler.mxSession userWithUserId:member2.userId];
|
||||
|
||||
// Move users who are not online or unavailable at the end (before invited users)
|
||||
if ((user1.presence == MXPresenceOnline) || (user1.presence == MXPresenceUnavailable)) {
|
||||
@@ -1092,7 +1092,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
||||
[self.actionMenu addActionWithTitle:@"Leave" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) {
|
||||
if (weakSelf) {
|
||||
weakSelf.actionMenu = nil;
|
||||
MXRoom *currentRoom = [[MatrixHandler sharedHandler].mxSession room:weakSelf.roomId];
|
||||
MXRoom *currentRoom = [[MatrixHandler sharedHandler].mxSession roomWithRoomId:weakSelf.roomId];
|
||||
[currentRoom leave:^{
|
||||
// Back to recents
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
Reference in New Issue
Block a user