make use of Obj-C's modern syntax for literals and subscripting

This commit is contained in:
fridtjof
2019-01-08 00:24:11 +01:00
parent 125e801218
commit 0e8c73344d
27 changed files with 195 additions and 197 deletions
@@ -173,7 +173,7 @@
[kRiotPrimaryBgColor getWhite:&white alpha:nil];
CGColorRef opaqueWhiteColor = [UIColor colorWithWhite:white alpha:1.0].CGColor;
CGColorRef transparentWhiteColor = [UIColor colorWithWhite:white alpha:0].CGColor;
tableViewMaskLayer.colors = [NSArray arrayWithObjects:(__bridge id)transparentWhiteColor, (__bridge id)transparentWhiteColor, (__bridge id)opaqueWhiteColor, nil];
tableViewMaskLayer.colors = @[(__bridge id) transparentWhiteColor, (__bridge id) transparentWhiteColor, (__bridge id) opaqueWhiteColor];
if (self.tableView.dataSource)
{
@@ -581,13 +581,12 @@
CGColorRef opaqueWhiteColor = [UIColor colorWithWhite:white alpha:1.0].CGColor;
CGColorRef transparentWhiteColor = [UIColor colorWithWhite:white alpha:0].CGColor;
tableViewMaskLayer.colors = [NSArray arrayWithObjects:(__bridge id)transparentWhiteColor, (__bridge id)transparentWhiteColor, (__bridge id)opaqueWhiteColor, nil];
tableViewMaskLayer.colors = @[(__bridge id) transparentWhiteColor, (__bridge id) transparentWhiteColor, (__bridge id) opaqueWhiteColor];
// display a gradient to the rencents bottom (20% of the bottom of the screen)
tableViewMaskLayer.locations = [NSArray arrayWithObjects:
[NSNumber numberWithFloat:0],
[NSNumber numberWithFloat:0.85],
[NSNumber numberWithFloat:1.0], nil];
tableViewMaskLayer.locations = @[@0.0F,
@0.85F,
@1.0F];
tableViewMaskLayer.bounds = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
tableViewMaskLayer.anchorPoint = CGPointZero;
@@ -671,18 +670,18 @@
// List all the participants matrix user id to ignore them during the contacts search.
for (Contact *contact in actualParticipants)
{
[contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId];
contactsDataSource.ignoredContactsByMatrixId[contact.mxMember.userId] = contact;
}
for (Contact *contact in invitedParticipants)
{
if (contact.mxMember)
{
[contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId];
contactsDataSource.ignoredContactsByMatrixId[contact.mxMember.userId] = contact;
}
}
if (userParticipant)
{
[contactsDataSource.ignoredContactsByMatrixId setObject:userParticipant forKey:userParticipant.mxMember.userId];
contactsDataSource.ignoredContactsByMatrixId[userParticipant.mxMember.userId] = userParticipant;
}
[contactsPickerViewController showSearch:YES];