Skip to content

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

fix selection on notebookItem

ammarahm-ede2bc0a793362
diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.js
index f1a3fa6b5..ff33ca29d 100644
--- a/apps/mobile/src/components/NotebookItem/index.js
+++ b/apps/mobile/src/components/NotebookItem/index.js
@@ -23,11 +23,16 @@ export const NotebookItem = ({
customStyle,
onLongPress,
navigation,
+ selectionMode,
}) => {
const [state, dispatch] = useTracked();
const {colors, selectedItemsList} = state;
const navigate = () => {
+ if (selectionMode) {
+ onLongPress();
+ return;
+ }
isTopic
? NavigationService.navigate('Notes', {
...item,
diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.js
index f8251b734..5967a7cae 100644
--- a/apps/mobile/src/views/Folders/index.js
+++ b/apps/mobile/src/views/Folders/index.js
@@ -222,11 +222,15 @@ export const Folders = ({navigation}) => {
marginHorizontal: 0,
}}
isMove={params.isMove}
+ selectionMode={selectionMode}
onLongPress={() => {
- dispatch({
- type: ACTIONS.SELECTION_MODE,
- enabled: !selectionMode,
- });
+ if (!selectionMode) {
+ dispatch({
+ type: ACTIONS.SELECTION_MODE,
+ enabled: !selectionMode,
+ });
+ }
+
dispatch({
type: ACTIONS.SELECTED_ITEMS,
item: item,