-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Groups: self-management of membership of groups #429
Conversation
- Handle the list of the groups from the server sync response. element-hq/riot-meta#114
@param success A block object called when the operation succeeds. | ||
@param failure A block object called when the operation fails. | ||
*/ | ||
- (void)asyncGroups:(void (^)(NSArray<MXGroup *> *groups))success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update the files structure
provided in this file header?
MatrixSDK/JSONModels/MXJSONModels.h
Outdated
|
||
@property (nonatomic) NSArray<NSString*> *users; | ||
|
||
@property (nonatomic) NSDictionary *roles; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is roles?
MatrixSDK/JSONModels/MXJSONModels.h
Outdated
|
||
@property (nonatomic) NSArray<NSString*> *rooms; | ||
|
||
@property (nonatomic) NSDictionary *categories; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is categories?
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
@@ -1222,6 +1256,39 @@ + (id)modelFromJSON:(NSDictionary *)JSONDictionary | |||
|
|||
@end | |||
|
|||
@implementation MXGroupsSyncResponse | |||
|
|||
// Override the default Mantle modelFromJSON method to convert groups lists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not use Mantle anymore.
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupProfile *profile = [[MXGroupProfile alloc] init]; | ||
if (profile) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MXJSONModel removeNullValuesInJSON:]
should not be required. It was useful for MXEvent at the beginning of the project
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupSummaryRoomsSection *roomsSection = [[MXGroupSummaryRoomsSection alloc] init]; | ||
if (roomsSection) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless [MXJSONModel removeNullValuesInJSON:]
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupRoom *room = [[MXGroupRoom alloc] init]; | ||
if (room) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless [MXJSONModel removeNullValuesInJSON:]
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupRooms *rooms = [[MXGroupRooms alloc] init]; | ||
if (rooms) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless [MXJSONModel removeNullValuesInJSON:]
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupUser *user = [[MXGroupUser alloc] init]; | ||
if (user) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless [MXJSONModel removeNullValuesInJSON:]
MatrixSDK/JSONModels/MXJSONModels.m
Outdated
MXGroupUsers *users = [[MXGroupUsers alloc] init]; | ||
if (users) | ||
{ | ||
NSDictionary *dict = [MXJSONModel removeNullValuesInJSON:JSONDictionary]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless [MXJSONModel removeNullValuesInJSON:]
element-hq/riot-meta#114