From 5adcc8d6b34e0e2db145e5609248b477eaa16e0c Mon Sep 17 00:00:00 2001 From: Renard Date: Sun, 22 Sep 2019 12:50:45 -0300 Subject: Hue filter avatars --- src/Post.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Post.js b/src/Post.js index 1140d49..6e09dd2 100644 --- a/src/Post.js +++ b/src/Post.js @@ -62,13 +62,15 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => { Math.round(idRng() * 200) + ")"; - let rndAvatar; + let rndAvatar, hue; if (user_id !== "") { - let i = Math.round(idRng() * avatars.length); + let i = Math.round(idRng() * avatars.length - 1); rndAvatar = avatars[i]; + hue = Math.round(idRng() * 360); } else { - let i = Math.round(rng() * avatars.length); + let i = Math.round(rng() * avatars.length - 1); rndAvatar = avatars[i]; + hue = Math.round(rng() * 360); } let flag; @@ -105,6 +107,7 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => {