attachments ui: Initialize table sorted by Date uploaded column.

Previously we only added the active class to the Date uploaded
column, thinking it was already sorted by upload date by default.
However, it wasn't, so now we explicitly make a call to sort it by upload
date to fix an issue with broken sorting.

Fixes #10518.
This commit is contained in:
Cynthia Lin 2018-09-29 09:19:03 -07:00 committed by Tim Abbott
parent 95fc86442e
commit b27201056c
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,8 @@ function render_attachments_ui() {
parent_container: $('#attachments-settings').expectOne(),
}).init();
list.sort('numeric', 'create_time');
list.add_sort_function("mentioned-in", function (a, b) {
var a_m = a.messages[0];
var b_m = b.messages[0];