Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

update

ammarahm-ed791129339dca
diff --git a/apps/mobile/src/provider/actions.js b/apps/mobile/src/provider/actions.js
index 56e55b235..3471bd6d0 100644
--- a/apps/mobile/src/provider/actions.js
+++ b/apps/mobile/src/provider/actions.js
@@ -15,4 +15,5 @@ export const ACTIONS = {
COLORS: 'colorNotes',
SEARCH_RESULTS: 'searchResults',
USER: 'getUser',
+ CURRENT_SCREEN: 'currentScreen',
};
diff --git a/apps/mobile/src/provider/defaultState.js b/apps/mobile/src/provider/defaultState.js
index 2ec890473..8e32dfc55 100644
--- a/apps/mobile/src/provider/defaultState.js
+++ b/apps/mobile/src/provider/defaultState.js
@@ -12,6 +12,7 @@ export const defaultState = {
tags: [],
colorNotes: [],
user: {},
+ currentScreen: 'home',
colors: {
night: false,
bg: 'white',
diff --git a/apps/mobile/src/provider/reducer.js b/apps/mobile/src/provider/reducer.js
index 3321677c3..c2c9d0c42 100644
--- a/apps/mobile/src/provider/reducer.js
+++ b/apps/mobile/src/provider/reducer.js
@@ -52,6 +52,12 @@ export const reducer = (state, action) => {
pinned: pinned,
};
}
+ case ACTIONS.CURRENT_SCREEN: {
+ return {
+ ...state,
+ currentScreen: action.screen,
+ };
+ }
case ACTIONS.TAGS: {
let tagList = db.notes.tags;
return {
@@ -61,7 +67,6 @@ export const reducer = (state, action) => {
}
case ACTIONS.FAVORITES: {
let favorites = [...db.notes.favorites];
-
return {
...state,
favorites: [...favorites],