Added fourth argument, `reset`, to `proposeLayoutChange` API so that `updateTheme` can be invoked with `noquestion == true`, thereby squelching "Would you like to reset colors to their default value?" prompt.

pull/268/head
David J. Malan 2016-03-07 19:18:17 -05:00 zatwierdzone przez nightwing
rodzic 8f33c9ea59
commit da19bff27f
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -214,7 +214,7 @@ define(function(require, exports, module) {
}
}
function proposeLayoutChange(kind, force, type) {
function proposeLayoutChange(kind, force, type, reset) {
if (!force && settings.getBool("user/general/@propose"))
return;
@ -225,7 +225,7 @@ define(function(require, exports, module) {
ignoreTheme = true;
var theme = {"dark": "flat-dark", "light": "flat-light"}[kind];
settings.set("user/general/@skin", theme);
updateTheme(false, type);
updateTheme(!!reset, type);
ignoreTheme = false;
settings.set("user/general/@propose", question.dontAsk);
},
@ -639,4 +639,4 @@ define(function(require, exports, module) {
layout: plugin
});
}
});
});