Skip to content
Snippets Groups Projects
Commit e0208690 authored by wajeeha-khalid's avatar wajeeha-khalid
Browse files

refactored variable name

parent a52cafcc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment