kopia lustrzana https://github.com/c9/core
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.
rodzic
8f33c9ea59
commit
da19bff27f
|
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue