Commit 13f7ba05 authored by Phil Hughes's avatar Phil Hughes

Removed usage of normilizeEmojiName method

Fixed some Ruby based on feedback
parent 319c9360
......@@ -55,7 +55,6 @@ class @AwardsHandler
, 200
addAward: (emoji) ->
emoji = @normilizeEmojiName(emoji)
@postEmoji emoji, =>
@addAwardToEmojiBar(emoji)
......@@ -64,7 +63,6 @@ class @AwardsHandler
addAwardToEmojiBar: (emoji) ->
@addEmojiToFrequentlyUsedList(emoji)
emoji = @normilizeEmojiName(emoji)
if @exist(emoji)
if @isActive(emoji)
@decrementCounter(emoji)
......@@ -165,9 +163,6 @@ class @AwardsHandler
scrollTop: $('.awards').offset().top - 80
}, 200)
normilizeEmojiName: (emoji) ->
emoji
addEmojiToFrequentlyUsedList: (emoji) ->
frequently_used_emojis = @getFrequentlyUsedEmojis()
frequently_used_emojis.push(emoji)
......
......@@ -53,8 +53,7 @@ class AwardEmoji
end
def self.unicode
emojis
emojis.map{|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!)
@unicode ||= emojis.map {|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!)
end
def self.aliases
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment