Commit 90891c22 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

FileManager: fixed sort order preference saving

parent 6360e841
......@@ -84,14 +84,14 @@ define([
},
methods: {
sortMod: function(col) {
var so = this.pref("sortOrder");
var so = this.pref("sortOrder").slice();
var plop = function(n, m) {
var i = so.indexOf(n);
switch(i) {
case -1:
return true;
case 0:
so.$set(0, m);
so[0] = m;
return false;
default:
so.splice(i, 1);
......@@ -101,6 +101,7 @@ define([
};
if (plop(col, "-"+col) && plop("-"+col, col))
so.splice(0, 0, col);
this.pref("sortOrder", so);
},
filterStart: function() {
this.filterActive = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment