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 ...@@ -55,7 +55,6 @@ class @AwardsHandler
, 200 , 200
addAward: (emoji) -> addAward: (emoji) ->
emoji = @normilizeEmojiName(emoji)
@postEmoji emoji, => @postEmoji emoji, =>
@addAwardToEmojiBar(emoji) @addAwardToEmojiBar(emoji)
...@@ -64,7 +63,6 @@ class @AwardsHandler ...@@ -64,7 +63,6 @@ class @AwardsHandler
addAwardToEmojiBar: (emoji) -> addAwardToEmojiBar: (emoji) ->
@addEmojiToFrequentlyUsedList(emoji) @addEmojiToFrequentlyUsedList(emoji)
emoji = @normilizeEmojiName(emoji)
if @exist(emoji) if @exist(emoji)
if @isActive(emoji) if @isActive(emoji)
@decrementCounter(emoji) @decrementCounter(emoji)
...@@ -165,9 +163,6 @@ class @AwardsHandler ...@@ -165,9 +163,6 @@ class @AwardsHandler
scrollTop: $('.awards').offset().top - 80 scrollTop: $('.awards').offset().top - 80
}, 200) }, 200)
normilizeEmojiName: (emoji) ->
emoji
addEmojiToFrequentlyUsedList: (emoji) -> addEmojiToFrequentlyUsedList: (emoji) ->
frequently_used_emojis = @getFrequentlyUsedEmojis() frequently_used_emojis = @getFrequentlyUsedEmojis()
frequently_used_emojis.push(emoji) frequently_used_emojis.push(emoji)
......
...@@ -53,8 +53,7 @@ class AwardEmoji ...@@ -53,8 +53,7 @@ class AwardEmoji
end end
def self.unicode def self.unicode
emojis @unicode ||= emojis.map {|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!)
emojis.map{|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!)
end end
def self.aliases 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