From 8ccebbe1564fe76b376eee83ad985b934edcbfa9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 19 Jun 2018 16:17:50 +0300 Subject: both bugs fixed. it's reactive and no more conflicting cards --- src/services/user_highlighter/user_highlighter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/services/user_highlighter/user_highlighter.js') diff --git a/src/services/user_highlighter/user_highlighter.js b/src/services/user_highlighter/user_highlighter.js index 94bf2c40..e10ef3bd 100644 --- a/src/services/user_highlighter/user_highlighter.js +++ b/src/services/user_highlighter/user_highlighter.js @@ -1,7 +1,6 @@ import { hex2rgb } from '../color_convert/color_convert.js' -const highlightStyle = (user, store) => { - const color = store.state.config.highlight[user.screen_name] - if (!color) return +const highlightStyle = (color) => { + if (typeof color !== 'string') return const rgb = hex2rgb(color) const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)` const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)` -- cgit v1.2.3-70-g09d2