mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 14:39:34 +01:00
fix: clear settings on logout
This commit is contained in:
@@ -31,6 +31,15 @@ class Settings {
|
||||
var settings = await this._db.context.read("settings");
|
||||
if (!settings) await this._db.context.write("settings", this._settings);
|
||||
else this._settings = settings;
|
||||
EV.subscribe("user:loggedOut", () => {
|
||||
this._settings = {
|
||||
type: "settings",
|
||||
id: id(),
|
||||
pins: [],
|
||||
dateEdited: 0,
|
||||
dateCreated: Date.now(),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async pin(type, data) {
|
||||
|
||||
Reference in New Issue
Block a user