mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
fix: make welcome note fetching origin independent
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"title": "Welcome to Notesnook!",
|
||||
"headline": "Thank you for checking out Notesnook. We are so glad to have you on board!",
|
||||
"webContent": "https://app.notesnook.com/notes/welcome-web",
|
||||
"webContent": "/notes/welcome-web",
|
||||
"mobileContent": "https://app.notesnook.com/notes/welcome-mobile",
|
||||
"autoOpen": true
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ async function loadDefaultNotes(db) {
|
||||
if (note.autoOpen) autoOpenId = id;
|
||||
}
|
||||
|
||||
EV.publish(EVENTS.appRefreshRequested);
|
||||
if (autoOpenId) quickNavigate(`/notes/${autoOpenId}/edit`);
|
||||
setAppHydrated();
|
||||
EV.publish(EVENTS.appRefreshRequested);
|
||||
}
|
||||
|
||||
function quickNavigate(url) {
|
||||
|
||||
@@ -19,6 +19,8 @@ class UserStore extends BaseStore {
|
||||
lastSynced = 0;
|
||||
|
||||
init = () => {
|
||||
EV.subscribe(EVENTS.appRefreshRequested, () => appStore.refresh());
|
||||
|
||||
db.user.getUser().then((user) => {
|
||||
if (!user) return false;
|
||||
this.set((state) => {
|
||||
@@ -32,7 +34,6 @@ class UserStore extends BaseStore {
|
||||
state.user = user;
|
||||
state.isLoggedIn = true;
|
||||
});
|
||||
EV.subscribe(EVENTS.appRefreshRequested, () => appStore.refresh());
|
||||
EV.subscribe(EVENTS.userSubscriptionUpdated, (subscription) => {
|
||||
this.set((state) => (state.user.subscription = subscription));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user