зеркало из https://github.com/nextcloud/talk-ios.git
Better implementation of NCRoom class methods.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
6b85ecb4ea
Коммит
1883722885
|
@ -71,6 +71,7 @@ extern NSString * const NCRoomObjectTypeSharePassword;
|
|||
@property (nonatomic, assign) BOOL hasCall;
|
||||
@property (nonatomic, assign) NSInteger lastUpdate;
|
||||
|
||||
+ (instancetype)roomWithDictionary:(NSDictionary *)roomDict;
|
||||
+ (instancetype)roomWithDictionary:(NSDictionary *)roomDict andAccountId:(NSString *)accountId;
|
||||
+ (void)updateRoom:(NCRoom *)managedRoom withRoom:(NCRoom *)room;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ NSString * const NCRoomObjectTypeSharePassword = @"share:password";
|
|||
return nil;
|
||||
}
|
||||
|
||||
NCRoom *room = [[NCRoom alloc] init];
|
||||
NCRoom *room = [[self alloc] init];
|
||||
room.roomId = [[roomDict objectForKey:@"id"] integerValue];
|
||||
room.token = [roomDict objectForKey:@"token"];
|
||||
room.type = (NCRoomType)[[roomDict objectForKey:@"type"] integerValue];
|
||||
|
@ -66,7 +66,7 @@ NSString * const NCRoomObjectTypeSharePassword = @"share:password";
|
|||
|
||||
+ (instancetype)roomWithDictionary:(NSDictionary *)roomDict andAccountId:(NSString *)accountId
|
||||
{
|
||||
NCRoom *room = [NCRoom roomWithDictionary:roomDict];
|
||||
NCRoom *room = [self roomWithDictionary:roomDict];
|
||||
if (room) {
|
||||
room.accountId = accountId;
|
||||
room.internalId = [NSString stringWithFormat:@"%@@%@", room.accountId, room.token];
|
||||
|
|
Загрузка…
Ссылка в новой задаче