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