mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix selection on notebookItem
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user