Differentiate sortOrder for repos without lastBuildFinishedAt
All of the repos without lastBuildFinishedAt had the same value for sortOrder, which could result in 'jumps' on the list when loading new data from the API.
This commit is contained in:
parent
de4721abfc
commit
39466a233f
|
@ -42,7 +42,11 @@ require 'travis/model'
|
|||
).property('data.last_build_duration', 'lastBuildStartedAt', 'lastBuildFinishedAt')
|
||||
|
||||
sortOrder: (->
|
||||
- new Date(@get('lastBuildFinishedAt') || '9999').getTime() # cuz sortAscending seems buggy when set to false
|
||||
# cuz sortAscending seems buggy when set to false
|
||||
if lastBuildFinishedAt = @get('lastBuildFinishedAt')
|
||||
- new Date(lastBuildFinishedAt).getTime()
|
||||
else
|
||||
- new Date('9999').getTime() + parseInt(@get('id'))
|
||||
).property('lastBuildFinishedAt')
|
||||
|
||||
stats: (->
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user