From cde3b252da4b7992e6f6acc16030d7af1d375eb7 Mon Sep 17 00:00:00 2001 From: Rob Date: Wed, 4 Nov 2015 16:57:48 -0800 Subject: [PATCH] Don't load user sessions on non premium dashboards. --- app/views/clans/ClanDetailsView.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/clans/ClanDetailsView.coffee b/app/views/clans/ClanDetailsView.coffee index 765609f65..f6be50d7d 100644 --- a/app/views/clans/ClanDetailsView.coffee +++ b/app/views/clans/ClanDetailsView.coffee @@ -64,7 +64,6 @@ module.exports = class ClanDetailsView extends RootView @supermodel.loadModel @clan, 'clan', cache: false @supermodel.loadCollection(@members, 'members', {cache: false}) @supermodel.loadCollection(@memberAchievements, 'member_achievements', {cache: false}) - @supermodel.loadCollection(@memberSessions, 'member_sessions', {cache: false}) getRenderData: -> context = super() @@ -115,7 +114,7 @@ module.exports = class ClanDetailsView extends RootView lastLevelIndex++ levelCount++ - @sortMembers(highestUserLevelCountMap, userConceptsMap) if @clan.get('dashboardType') is 'premium' + @sortMembers(highestUserLevelCountMap, userConceptsMap)# if @clan.get('dashboardType') is 'premium' context.members = @members?.models ? [] context.lastUserCampaignLevelMap = lastUserCampaignLevelMap context.showExpandedProgress = maxLastUserCampaignLevel <= 30 or @showExpandedProgress @@ -207,6 +206,8 @@ module.exports = class ClanDetailsView extends RootView @owner = new User _id: @clan.get('ownerID') @listenTo @owner, 'sync', => @render?() @supermodel.loadModel @owner, 'owner', cache: false + if @clan.get("dashboardType") is "premium" + @supermodel.loadCollection(@memberSessions, 'member_sessions', {cache: false}) @render?() onMembersSync: ->