diff --git a/apps/mobile/patches/@react-navigation+drawer+5.12.5.patch b/apps/mobile/patches/@react-navigation+drawer+5.12.5.patch.old
similarity index 100%
rename from apps/mobile/patches/@react-navigation+drawer+5.12.5.patch
rename to apps/mobile/patches/@react-navigation+drawer+5.12.5.patch.old
diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetColorsSection.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetColorsSection.js
index 2d34713bd..31a3ec147 100644
--- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetColorsSection.js
+++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetColorsSection.js
@@ -1,25 +1,19 @@
-import React, {useState} from 'react';
-import {View} from 'react-native';
+import React, { useState } from 'react';
+import { View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import {notesnook} from '../../../e2e/test.ids';
-import {useTracked} from '../../provider';
-import {Actions} from '../../provider/Actions';
+import { notesnook } from '../../../e2e/test.ids';
import { useMenuStore } from '../../provider/stores';
-import {DDS} from '../../services/DeviceDetection';
-import {eSendEvent, sendNoteEditedEvent} from '../../services/EventManager';
+import { DDS } from '../../services/DeviceDetection';
+import { eSendEvent } from '../../services/EventManager';
import Navigation from '../../services/Navigation';
-import PremiumService from '../../services/PremiumService';
-import {dWidth} from '../../utils';
-import {COLORS_NOTE} from '../../utils/Colors';
-import {hexToRGBA, RGB_Linear_Shade} from '../../utils/ColorUtils';
-import {db} from '../../utils/DB';
-import {eShowGetPremium, refreshNotesPage} from '../../utils/Events';
-import {SIZE} from '../../utils/SizeUtils';
-import {sleep} from '../../utils/TimeUtils';
-import {PressableButton} from '../PressableButton';
+import { dWidth } from '../../utils';
+import { COLORS_NOTE } from '../../utils/Colors';
+import { db } from '../../utils/DB';
+import { refreshNotesPage } from '../../utils/Events';
+import { SIZE } from '../../utils/SizeUtils';
+import { PressableButton } from '../PressableButton';
export const ActionSheetColorsSection = ({item, close}) => {
- const [, dispatch] = useTracked();
const [note, setNote] = useState(item);
const setColorNotes = useMenuStore(state => state.setColorNotes)
const localRefresh = () => {
diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js
index 74c683bdd..e61493328 100644
--- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js
+++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetTagsSection.js
@@ -1,21 +1,15 @@
-import React, {createRef, useCallback, useEffect, useState} from 'react';
-import {TextInput, TouchableOpacity, View} from 'react-native';
-import {ScrollView} from 'react-native-gesture-handler';
-import {notesnook} from '../../../e2e/test.ids';
-import {useTracked} from '../../provider';
-import {Actions} from '../../provider/Actions';
+import React, { createRef, useCallback, useEffect, useState } from 'react';
+import { TextInput, TouchableOpacity, View } from 'react-native';
+import { ScrollView } from 'react-native-gesture-handler';
+import { notesnook } from '../../../e2e/test.ids';
+import { useTracked } from '../../provider';
import {
- eSendEvent,
- sendNoteEditedEvent,
- ToastEvent,
+ ToastEvent
} from '../../services/EventManager';
import Navigation from '../../services/Navigation';
-import {db} from '../../utils/DB';
-import {refreshNotesPage} from '../../utils/Events';
-import {SIZE} from '../../utils/SizeUtils';
-import {Button} from '../Button';
-import Heading from '../Typography/Heading';
-import Paragraph from '../Typography/Paragraph';
+import { db } from '../../utils/DB';
+import { SIZE } from '../../utils/SizeUtils';
+import { Button } from '../Button';
const tagsInputRef = createRef();
let prevQuery = null;
diff --git a/apps/mobile/src/components/ActionSheetComponent/GetPremium.js b/apps/mobile/src/components/ActionSheetComponent/GetPremium.js
index 9cc8b85a4..b4c70e125 100644
--- a/apps/mobile/src/components/ActionSheetComponent/GetPremium.js
+++ b/apps/mobile/src/components/ActionSheetComponent/GetPremium.js
@@ -1,25 +1,24 @@
-import React, {useEffect, useState} from 'react';
-import {Keyboard} from 'react-native';
-import {Platform, View} from 'react-native';
-import Animated, {Easing} from 'react-native-reanimated';
-import {useTracked} from '../../provider';
-import {DDS} from '../../services/DeviceDetection';
+import React, { useEffect, useState } from 'react';
+import { View } from 'react-native';
+import Animated, { Easing } from 'react-native-reanimated';
+import { useTracked } from '../../provider';
+import { DDS } from '../../services/DeviceDetection';
import {
eSendEvent,
eSubscribeEvent,
- eUnSubscribeEvent,
+ eUnSubscribeEvent
} from '../../services/EventManager';
-import {dWidth, editing, getElevation} from '../../utils';
+import { dWidth, editing, getElevation } from '../../utils';
import {
eCloseActionSheet,
eOpenPremiumDialog,
- eShowGetPremium,
+ eShowGetPremium
} from '../../utils/Events';
-import {SIZE} from '../../utils/SizeUtils';
-import {sleep} from '../../utils/TimeUtils';
-import {EditorWebView, post} from '../../views/Editor/Functions';
+import { SIZE } from '../../utils/SizeUtils';
+import { sleep } from '../../utils/TimeUtils';
+import { EditorWebView } from '../../views/Editor/Functions';
import tiny from '../../views/Editor/tiny/tiny';
-import {Button} from '../Button';
+import { Button } from '../Button';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/AddNotebookDialog/index.js
index 27dd523d5..d274cfbb6 100644
--- a/apps/mobile/src/components/AddNotebookDialog/index.js
+++ b/apps/mobile/src/components/AddNotebookDialog/index.js
@@ -1,19 +1,8 @@
import React, {createRef} from 'react';
-import {
- ActionSheetIOS,
- Keyboard,
- KeyboardAvoidingView,
- Modal,
- Platform,
- SafeAreaView,
- StyleSheet,
- TouchableOpacity,
- View,
-} from 'react-native';
+import {Keyboard, StyleSheet, TouchableOpacity, View} from 'react-native';
import {FlatList, TextInput} from 'react-native-gesture-handler';
import {notesnook} from '../../../e2e/test.ids';
-import {Actions} from '../../provider/Actions';
-import { useMenuStore } from '../../provider/stores';
+import {useMenuStore} from '../../provider/stores';
import {DDS} from '../../services/DeviceDetection';
import {ToastEvent} from '../../services/EventManager';
import Navigation from '../../services/Navigation';
@@ -21,11 +10,9 @@ import {db} from '../../utils/DB';
import {ph, pv, SIZE} from '../../utils/SizeUtils';
import {sleep} from '../../utils/TimeUtils';
import {ActionIcon} from '../ActionIcon';
-import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
import BaseDialog from '../Dialog/base-dialog';
import DialogButtons from '../Dialog/dialog-buttons';
import DialogHeader from '../Dialog/dialog-header';
-import {updateEvent} from '../DialogManager/recievers';
import Input from '../Input';
import {Toast} from '../Toast';
import Paragraph from '../Typography/Paragraph';
diff --git a/apps/mobile/src/components/AppLoader/index.js b/apps/mobile/src/components/AppLoader/index.js
index be678693f..ad9bdb3e8 100644
--- a/apps/mobile/src/components/AppLoader/index.js
+++ b/apps/mobile/src/components/AppLoader/index.js
@@ -3,20 +3,18 @@ import { View } from 'react-native';
import Animated, { Easing } from 'react-native-reanimated';
import AnimatedProgress from 'react-native-reanimated-progress-bar';
import { useTracked } from '../../provider';
-import { Actions } from '../../provider/Actions';
import { useFavoriteStore, useNoteStore } from '../../provider/stores';
import {
eSendEvent,
eSubscribeEvent,
eUnSubscribeEvent
} from '../../services/EventManager';
-import { editing, InteractionManager } from '../../utils';
+import { editing } from '../../utils';
import { changeContainerScale, ContainerScale } from '../../utils/Animations';
import { db } from '../../utils/DB';
import { eOpenRateDialog, eOpenSideMenu } from '../../utils/Events';
import { MMKV } from '../../utils/mmkv';
import { tabBarRef } from '../../utils/Refs';
-import { sleep } from '../../utils/TimeUtils';
import SplashScreen from '../SplashScreen';
const scaleV = new Animated.Value(0.95);
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.js
index a75e7ca3d..e64a184fa 100644
--- a/apps/mobile/src/components/Container/index.js
+++ b/apps/mobile/src/components/Container/index.js
@@ -4,8 +4,6 @@ import Animated from 'react-native-reanimated';
import { useTracked } from '../../provider';
import { ContainerScale } from '../../utils/Animations';
import useIsFloatingKeyboard from '../../utils/use-is-floating-keyboard';
-import SelectionHeader from '../SelectionHeader';
-import { ContainerTopSection } from './ContainerTopSection';
const AnimatedView = Animated.createAnimatedComponent(SafeAreaView);
export const Container = ({children, root}) => {
const [state] = useTracked();
diff --git a/apps/mobile/src/components/CustomTabs/index.js b/apps/mobile/src/components/CustomTabs/index.js
index ac3161cfe..4ee09c6f9 100644
--- a/apps/mobile/src/components/CustomTabs/index.js
+++ b/apps/mobile/src/components/CustomTabs/index.js
@@ -9,6 +9,7 @@ export default class CustomTabs extends Component {
this.listRef = createRef();
this.scrollOffset = props.initialIndex === 0 ? 0 : this.props.offsets.a;
this.page = 0;
+ this.nextPage = 0;
this.currentDrawerState = false;
this.inputElement = createRef();
this.keyboardState = false;
@@ -58,6 +59,7 @@ export default class CustomTabs extends Component {
};
hideKeyboardIfVisible() {
+ if (this.nextPage === 1) return;
if ((editing.keyboardState || editing.isFocused) && this.scrollOffset < this.props.offsets.b - 50) {
editing.isFocused = false;
editing.keyboardState = false;
@@ -67,6 +69,13 @@ export default class CustomTabs extends Component {
}
goToIndex(index, animated = true) {
+ if (index === 1) {
+ this.nextPage = 0;
+ } else if (index === 2) {
+ this.nextPage = 1
+ } else {
+ this.nextPage = 0;
+ }
this.listRef.current?.scrollToIndex({
animated: animated,
index: index,
@@ -110,6 +119,7 @@ export default class CustomTabs extends Component {
};
goToPage = page => {
+ this.nextPage = page;
if (page === 0) {
this.scrollOffset = this.props.offsets.a;
this.hideKeyboardIfVisible();
diff --git a/apps/mobile/src/components/Dialog/BaseDialog.js b/apps/mobile/src/components/Dialog/BaseDialog.js
index 6821d534d..4bf88aa8b 100644
--- a/apps/mobile/src/components/Dialog/BaseDialog.js
+++ b/apps/mobile/src/components/Dialog/BaseDialog.js
@@ -1,15 +1,13 @@
import React from 'react';
import {
- Animated,
KeyboardAvoidingView,
Modal,
Platform,
SafeAreaView,
StyleSheet,
- TouchableOpacity,
- View,
+ TouchableOpacity
} from 'react-native';
-import {useTracked} from '../../provider';
+import { useTracked } from '../../provider';
import useIsFloatingKeyboard from '../../utils/use-is-floating-keyboard';
const BaseDialog = ({
diff --git a/apps/mobile/src/components/MoveNoteDialog/index.js b/apps/mobile/src/components/MoveNoteDialog/index.js
index 788f12e8b..82c0f2862 100644
--- a/apps/mobile/src/components/MoveNoteDialog/index.js
+++ b/apps/mobile/src/components/MoveNoteDialog/index.js
@@ -84,7 +84,6 @@ const MoveNoteComponent = ({close, note, setNote}) => {
const selectedItemsList = useSelectionStore(state => state.selectedItemsList);
const setNotebooks = useNotebookStore(state => state.setNotebooks);
-
const [expanded, setExpanded] = useState('');
const [notebookInputFocused, setNotebookInputFocused] = useState(false);
const [topicInputFocused, setTopicInputFocused] = useState(false);
diff --git a/apps/mobile/src/components/NoteItem/wrapper.js b/apps/mobile/src/components/NoteItem/wrapper.js
index f0f001d0b..4a7c4dcce 100644
--- a/apps/mobile/src/components/NoteItem/wrapper.js
+++ b/apps/mobile/src/components/NoteItem/wrapper.js
@@ -1,8 +1,6 @@
import React from 'react';
import NoteItem from '.';
import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { Actions } from '../../provider/Actions';
import { useSelectionStore } from '../../provider/stores';
import { DDS } from '../../services/DeviceDetection';
import { eSendEvent, openVault } from '../../services/EventManager';
diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.js
index 3069b30f5..3abc1a452 100644
--- a/apps/mobile/src/components/NotebookItem/index.js
+++ b/apps/mobile/src/components/NotebookItem/index.js
@@ -1,13 +1,13 @@
-import React, {useEffect, useState} from 'react';
-import {TouchableOpacity, View} from 'react-native';
+import React from 'react';
+import { TouchableOpacity, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import {notesnook} from '../../../e2e/test.ids';
-import {useTracked} from '../../provider';
+import { notesnook } from '../../../e2e/test.ids';
+import { useTracked } from '../../provider';
import Navigation from '../../services/Navigation';
-import {getTotalNotes, history} from '../../utils';
-import {pv, SIZE} from '../../utils/SizeUtils';
-import {ActionIcon} from '../ActionIcon';
-import {ActionSheetEvent} from '../DialogManager/recievers';
+import { getTotalNotes, history } from '../../utils';
+import { SIZE } from '../../utils/SizeUtils';
+import { ActionIcon } from '../ActionIcon';
+import { ActionSheetEvent } from '../DialogManager/recievers';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
diff --git a/apps/mobile/src/components/ProgressDialog/index.js b/apps/mobile/src/components/ProgressDialog/index.js
index cfb32c793..00e212e88 100644
--- a/apps/mobile/src/components/ProgressDialog/index.js
+++ b/apps/mobile/src/components/ProgressDialog/index.js
@@ -8,6 +8,7 @@ import {SIZE} from '../../utils/SizeUtils';
import {sleep} from '../../utils/TimeUtils';
import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
import {Button} from '../Button';
+import Seperator from '../Seperator';
import {Toast} from '../Toast';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
@@ -30,7 +31,7 @@ const ProgressDialog = () => {
};
}, []);
- const open = async (data) => {
+ const open = async data => {
setDialogData(data);
setVisible(true);
await sleep(1);
@@ -62,7 +63,7 @@ const ProgressDialog = () => {
) : dialogData?.noIcon ? null : (
@@ -82,17 +83,27 @@ const ProgressDialog = () => {
)}
+ {dialogData?.learnMore ? (
+
+ {' '}
+ {dialogData.learnMore}
+
+ ) : null}
{dialogData.valueArray &&
- dialogData.valueArray.map((v) => (
+ dialogData.valueArray.map(v => (