Have /tint use the primary color as the secondary if no secondary was given

This is to make the color scheme actually apply itself now that the secondary color is not optional. In order to preserve it being optional in the command, we'll use the primary color as the secondary color as it has no major visual impact.

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/21833/head
Travis Ralston 2017-12-25 13:39:32 -07:00
parent 2815c576c1
commit e8392dfa00
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ const commands = {
colorScheme.primary_color = matches[1];
if (matches[4]) {
colorScheme.secondary_color = matches[4];
} else {
colorScheme.secondary_color = colorScheme.primary_color;
}
return success(
SettingsStore.setValue("roomColor", roomId, SettingLevel.ROOM_ACCOUNT, colorScheme),