Removed usage of normilizeEmojiName method
Fixed some Ruby based on feedback
This commit is contained in:
parent
319c936055
commit
13f7ba059e
2 changed files with 1 additions and 7 deletions
|
@ -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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue