diff --git a/static/js/attachments_ui.js b/static/js/attachments_ui.js index 42d52a09b5..2fe92eab29 100644 --- a/static/js/attachments_ui.js +++ b/static/js/attachments_ui.js @@ -108,6 +108,7 @@ function render_attachments_ui() { }, $parent_container: $("#attachments-settings").expectOne(), init_sort: ["numeric", "create_time"], + initially_descending_sort: true, sort_fields: { mentioned_in: sort_mentioned_in, }, diff --git a/static/js/list_widget.js b/static/js/list_widget.js index 1687ff2d6f..81aee368a3 100644 --- a/static/js/list_widget.js +++ b/static/js/list_widget.js @@ -443,6 +443,11 @@ export function create($container, list, opts) { widget.set_sorting_function(...opts.init_sort); } + if (opts.initially_descending_sort) { + widget.set_reverse_mode(true); + opts.$simplebar_container.find(".active").addClass("descend"); + } + widget.clean_redraw(); // Save the instance for potential future retrieval if a name is provided.