mirror of https://github.com/vector-im/riot-web
Remove watch notifications from SettingsStore
It slows things down a bit, and in practice is more unlikely to be a problem than a savior.pull/21833/head
parent
a15aae4daf
commit
51592ccfb6
|
@ -148,7 +148,6 @@ export default class SettingsStore {
|
||||||
callbackFn(originalSettingName, changedInRoomId, atLevel, newValAtLevel, newValue);
|
callbackFn(originalSettingName, changedInRoomId, atLevel, newValAtLevel, newValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(`Starting watcher for ${settingName}@${roomId || '<null room>'} as ID ${watcherId}`);
|
|
||||||
SettingsStore._watchers[watcherId] = localizedCallback;
|
SettingsStore._watchers[watcherId] = localizedCallback;
|
||||||
defaultWatchManager.watchSetting(settingName, roomId, localizedCallback);
|
defaultWatchManager.watchSetting(settingName, roomId, localizedCallback);
|
||||||
|
|
||||||
|
@ -167,7 +166,6 @@ export default class SettingsStore {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Ending watcher ID ${watcherReference}`);
|
|
||||||
defaultWatchManager.unwatchSetting(SettingsStore._watchers[watcherReference]);
|
defaultWatchManager.unwatchSetting(SettingsStore._watchers[watcherReference]);
|
||||||
delete SettingsStore._watchers[watcherReference];
|
delete SettingsStore._watchers[watcherReference];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue