Room cell: Fix states of direct chat and favorite buttons in the menu (Fix #2788).

This commit is contained in:
SBiOSoftWhare
2019-10-18 15:12:13 +02:00
parent bfaacb207f
commit f75cb7bc6b
@@ -869,7 +869,7 @@
}];
UIImage *actionIcon = isDirect ? [UIImage imageNamed:@"directChatOff"] : [UIImage imageNamed:@"directChatOn"];
directAction.backgroundColor = [MXKTools convertImageToPatternColor:isDirect ? @"directChatOff" : @"directChatOn" backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
directAction.backgroundColor = [MXKTools convertImageToPatternColor:isDirect ? @"directChatOn" : @"directChatOff" backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
[actions insertObject:directAction atIndex:0];
@@ -907,8 +907,8 @@
}];
actionIcon = [UIImage imageNamed:@"favouriteOff"];
action.backgroundColor = [MXKTools convertImageToPatternColor:@"favouriteOff" backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
actionIcon = [UIImage imageNamed:@"favourite"];
action.backgroundColor = [MXKTools convertImageToPatternColor:@"favourite"backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
[actions insertObject:action atIndex:0];
}
else
@@ -919,8 +919,9 @@
}];
actionIcon = [UIImage imageNamed:@"favourite"];
action.backgroundColor = [MXKTools convertImageToPatternColor:@"favourite" backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
actionIcon = [UIImage imageNamed:@"favouriteOff"];
action.backgroundColor = [MXKTools convertImageToPatternColor:@"favouriteOff"
backgroundColor:ThemeService.shared.theme.headerBackgroundColor patternSize:CGSizeMake(74, 74) resourceSize:actionIcon.size];
[actions insertObject:action atIndex:0];
}