aboutsummaryrefslogtreecommitdiff
path: root/src/services/user_highlighter
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-06-19 16:17:50 +0300
committerHenry Jameson <me@hjkos.com>2018-07-06 20:12:09 +0300
commit8ccebbe1564fe76b376eee83ad985b934edcbfa9 (patch)
tree0d058c52b460d4647ddfae046695a2470f4e2be7 /src/services/user_highlighter
parentfa8c221f3a6f9b1421e29aa014304576810a08e6 (diff)
both bugs fixed. it's reactive and no more conflicting cards
Diffstat (limited to 'src/services/user_highlighter')
-rw-r--r--src/services/user_highlighter/user_highlighter.js5
1 files changed, 2 insertions, 3 deletions
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)`