remember sort order in popup, use "updated" by default
This commit is contained in:
parent
a32adf1c32
commit
ee43d6adaf
|
@ -37,6 +37,8 @@
|
|||
'popup.autoResort': false, // auto resort styles after toggling
|
||||
'popup.borders': false, // add white borders on the sides
|
||||
'popup.findStylesInline': true, // use the inline style search
|
||||
/** @type {'n' | 'u' | 't' | 'w' | 'r'} see IndexEntry */
|
||||
'popup.findSort': 'u', // the inline style search sort order
|
||||
|
||||
'manage.onlyEnabled': false, // display only enabled styles
|
||||
'manage.onlyLocal': false, // display only styles created locally
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
let searchGlobals = $('#search-globals').checked;
|
||||
/** @type string[] */
|
||||
let query = [];
|
||||
/** @type 'n' | 'u' | 't' | 'w' | 'r' */
|
||||
let order = 't';
|
||||
let order = prefs.get('popup.findSort');
|
||||
let scrollToFirstResult = true;
|
||||
let displayedPage = 1;
|
||||
let totalPages = 1;
|
||||
|
@ -103,6 +102,7 @@
|
|||
$('#search-order').value = order;
|
||||
$('#search-order').onchange = function () {
|
||||
order = this.value;
|
||||
prefs.set('popup.findSort', order);
|
||||
results.sort(comparator);
|
||||
render();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user