mirror of
https://github.com/thelounge/thelounge
synced 2024-11-29 07:20:25 +00:00
Remove unnecessary options.initialized switch
This commit is contained in:
parent
a1f183f216
commit
a2a2aff2bc
2 changed files with 1 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue