Remove watch notifications from SettingsStore
It slows things down a bit, and in practice is more unlikely to be a problem than a savior.
This commit is contained in:
@@ -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];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user