Sorted the friend sessions a bit.

This commit is contained in:
Scott Erickson 2014-03-26 14:22:04 -07:00
parent 781b33092c
commit 462d365ce0

View file

@ -155,7 +155,10 @@ module.exports = class LadderTabView extends CocoView
consolidateFriends: ->
allFriendSessions = (@facebookFriendSessions or []).concat(@gplusFriendSessions or [])
_.uniq allFriendSessions, false, (session) -> session._id
sessions = _.uniq allFriendSessions, false, (session) -> session._id
sessions = _.sortBy sessions, 'totalScore'
sessions.reverse()
sessions
class LeaderboardData
constructor: (@level, @team, @session) ->