Renaming: [MXSession room:] to [MXSession roomWithRoomId:]. [MXSession user:] to [MXSession userWithUserId:]

This commit is contained in:
manuroe
2014-12-02 11:19:51 +01:00
parent 900828bb48
commit 56e8f68d9b
4 changed files with 8 additions and 8 deletions

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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];

View File

@@ -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];