From acd9fe92b80b1e822ed14df26e3869565eb8ea2b Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Sat, 7 Mar 2020 17:40:05 +0300 Subject: [PATCH] Fix sort button icon --- src/controllers/list.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/list.js b/src/controllers/list.js index 6e25242a01..bcc38f27cf 100644 --- a/src/controllers/list.js +++ b/src/controllers/list.js @@ -157,6 +157,12 @@ define(["globalize", "listView", "layoutManager", "userSettings", "focusManager" return query; } + function setSortButtonIcon(btnSortIcon, icon) { + btnSortIcon.classList.remove("arrow_downward"); + btnSortIcon.classList.remove("arrow_upward"); + btnSortIcon.classList.add(icon); + } + function updateSortText(instance) { var btnSortText = instance.btnSortText; @@ -175,7 +181,7 @@ define(["globalize", "listView", "layoutManager", "userSettings", "focusManager" var btnSortIcon = instance.btnSortIcon; if (btnSortIcon) { - btnSortIcon.innerHTML = "Descending" === values.sortOrder ? "" : ""; + setSortButtonIcon(btnSortIcon, "Descending" === values.sortOrder ? "arrow_downward" : "arrow_upward"); } } }