Remove unnecessary options.initialized switch

This commit is contained in:
Tim Miller-Williams 2019-11-05 12:30:45 +00:00 committed by Pavel Djundik
parent a1f183f216
commit a2a2aff2bc
2 changed files with 1 additions and 11 deletions

View file

@ -64,7 +64,6 @@ userSettings = null;
module.exports = {
alwaysSync,
noSync,
initialized: false,
settings,
syncAllSettings,
processSetting,
@ -159,8 +158,6 @@ function processSetting(name, value, save) {
}
function initialize() {
module.exports.initialized = true;
// Settings have now entirely updated, apply settings to the client.
for (const name in settings) {
processSetting(name, settings[name], false);

View file

@ -21,15 +21,8 @@ window.addEventListener("beforeinstallprompt", (installPromptEvent) => {
$("#native-app").prop("hidden", false);
});
socket.on("configuration", function(data) {
socket.once("configuration", function(data) {
store.commit("isFileUploadEnabled", data.fileUpload);
if (options.initialized) {
// Likely a reconnect, request sync for possibly missed settings.
socket.emit("setting:get");
return;
}
store.commit("serverConfiguration", data);
if (data.fileUpload) {