mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 11:32:25 -05:00
Don't load user sessions on non premium dashboards.
This commit is contained in:
parent
75532e3a79
commit
cde3b252da
1 changed files with 3 additions and 2 deletions
|
@ -64,7 +64,6 @@ module.exports = class ClanDetailsView extends RootView
|
||||||
@supermodel.loadModel @clan, 'clan', cache: false
|
@supermodel.loadModel @clan, 'clan', cache: false
|
||||||
@supermodel.loadCollection(@members, 'members', {cache: false})
|
@supermodel.loadCollection(@members, 'members', {cache: false})
|
||||||
@supermodel.loadCollection(@memberAchievements, 'member_achievements', {cache: false})
|
@supermodel.loadCollection(@memberAchievements, 'member_achievements', {cache: false})
|
||||||
@supermodel.loadCollection(@memberSessions, 'member_sessions', {cache: false})
|
|
||||||
|
|
||||||
getRenderData: ->
|
getRenderData: ->
|
||||||
context = super()
|
context = super()
|
||||||
|
@ -115,7 +114,7 @@ module.exports = class ClanDetailsView extends RootView
|
||||||
lastLevelIndex++
|
lastLevelIndex++
|
||||||
levelCount++
|
levelCount++
|
||||||
|
|
||||||
@sortMembers(highestUserLevelCountMap, userConceptsMap) if @clan.get('dashboardType') is 'premium'
|
@sortMembers(highestUserLevelCountMap, userConceptsMap)# if @clan.get('dashboardType') is 'premium'
|
||||||
context.members = @members?.models ? []
|
context.members = @members?.models ? []
|
||||||
context.lastUserCampaignLevelMap = lastUserCampaignLevelMap
|
context.lastUserCampaignLevelMap = lastUserCampaignLevelMap
|
||||||
context.showExpandedProgress = maxLastUserCampaignLevel <= 30 or @showExpandedProgress
|
context.showExpandedProgress = maxLastUserCampaignLevel <= 30 or @showExpandedProgress
|
||||||
|
@ -207,6 +206,8 @@ module.exports = class ClanDetailsView extends RootView
|
||||||
@owner = new User _id: @clan.get('ownerID')
|
@owner = new User _id: @clan.get('ownerID')
|
||||||
@listenTo @owner, 'sync', => @render?()
|
@listenTo @owner, 'sync', => @render?()
|
||||||
@supermodel.loadModel @owner, 'owner', cache: false
|
@supermodel.loadModel @owner, 'owner', cache: false
|
||||||
|
if @clan.get("dashboardType") is "premium"
|
||||||
|
@supermodel.loadCollection(@memberSessions, 'member_sessions', {cache: false})
|
||||||
@render?()
|
@render?()
|
||||||
|
|
||||||
onMembersSync: ->
|
onMembersSync: ->
|
||||||
|
|
Loading…
Reference in a new issue