Avoid clearing e2e encryption keys, also avoid warning

This commit is contained in:
Bruno Windels 2018-08-13 17:24:27 +02:00
parent 08f322753d
commit 7dc92fe917
3 changed files with 10 additions and 29 deletions

View file

@ -15,10 +15,15 @@ limitations under the License.
*/
import SettingController from "./SettingController";
import dis from "../../dispatcher";
import MatrixClientPeg from "../../MatrixClientPeg";
import PlatformPeg from "../../PlatformPeg";
export default class LazyLoadingController extends SettingController {
onChange(level, roomId, newValue) {
dis.dispatch({action: 'flush_storage_reload'});
async onChange(level, roomId, newValue) {
if (!PlatformPeg.get()) return;
MatrixClientPeg.get().stopClient();
await MatrixClientPeg.get().store.deleteAllData();
PlatformPeg.get().reload();
}
}