From e020869089928a86d61388557d329a46d15e7ed3 Mon Sep 17 00:00:00 2001 From: wajeeha-khalid Date: Thu, 14 Apr 2016 16:42:57 +0500 Subject: [PATCH] refactored variable name --- common/static/coffee/src/discussion/discussion.coffee | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/static/coffee/src/discussion/discussion.coffee b/common/static/coffee/src/discussion/discussion.coffee index c674ae9c88..3b0c68b1ef 100644 --- a/common/static/coffee/src/discussion/discussion.coffee +++ b/common/static/coffee/src/discussion/discussion.coffee @@ -118,14 +118,13 @@ if Backbone? pinnedThreadsSortComparatorWithDate: (thread, ascending)-> # if threads are pinned they should be displayed on top. # Unpinned will be sorted by their last activity date - threadCreatedTime = new Date(thread.get("created_at")).getTime() - threadCreatedTime = new Date(thread.get("last_activity_at")).getTime() + threadLastActivityAtTime = new Date(thread.get("last_activity_at")).getTime() if thread.get('pinned') #use tomorrow's date today = new Date(); - preferredDate = new Date(today.getTime() + (24 * 60 * 60 * 1000) + threadCreatedTime); + preferredDate = new Date(today.getTime() + (24 * 60 * 60 * 1000) + threadLastActivityAtTime); else - preferredDate = threadCreatedTime + preferredDate = threadLastActivityAtTime if ascending preferredDate else