mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
web: fix features reset on subscription change
This commit is contained in:
@@ -354,6 +354,7 @@ class UserManager {
|
||||
);
|
||||
if (user) {
|
||||
const oldUser = await this.getUser();
|
||||
await this.setUser(user);
|
||||
if (
|
||||
oldUser &&
|
||||
(oldUser.subscription.plan !== user.subscription.plan ||
|
||||
@@ -365,7 +366,6 @@ class UserManager {
|
||||
}
|
||||
if (oldUser && !oldUser.isEmailConfirmed && user.isEmailConfirmed)
|
||||
EV.publish(EVENTS.userEmailConfirmed);
|
||||
await this.setUser(user);
|
||||
EV.publish(EVENTS.userFetched, user);
|
||||
return user;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user