From 355e62eb498de90f91ac129af94d4a0f2ec6b129 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Thu, 24 Dec 2015 16:35:45 +0200 Subject: added default for frequently used emojis --- app/assets/javascripts/awards_handler.coffee | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'app/assets/javascripts/awards_handler.coffee') diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index bb17427852d..04bf5cc7bb5 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -127,19 +127,21 @@ class @AwardsHandler getFrequentlyUsedEmojis: -> frequently_used_emojis = ($.cookie('frequently_used_emojis') || "").split(",") + + frequently_used_emojis = ["thumbsup", "thumbsdown"].concat(frequently_used_emojis) + _.compact(_.uniq(frequently_used_emojis)) renderFrequentlyUsedBlock: -> - if $.cookie('frequently_used_emojis') - frequently_used_emojis = @getFrequentlyUsedEmojis() + frequently_used_emojis = @getFrequentlyUsedEmojis() - ul = $("