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

View File

@ -21,15 +21,8 @@ window.addEventListener("beforeinstallprompt", (installPromptEvent) => {
$("#native-app").prop("hidden", false); $("#native-app").prop("hidden", false);
}); });
socket.on("configuration", function(data) { socket.once("configuration", function(data) {
store.commit("isFileUploadEnabled", data.fileUpload); 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); store.commit("serverConfiguration", data);
if (data.fileUpload) { if (data.fileUpload) {