Remove unnecessary options.initialized switch
This commit is contained in:
parent
a1f183f216
commit
a2a2aff2bc
@ -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);
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user