mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
do not all general topic to be selected
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, {useMemo} from 'react';
|
import React, {useMemo} from 'react';
|
||||||
import { notesnook } from '../../../e2e/test.ids';
|
import {notesnook} from '../../../e2e/test.ids';
|
||||||
import {NotebookItem} from '../../components/NotebookItem';
|
import {NotebookItem} from '../../components/NotebookItem';
|
||||||
import SelectionWrapper from '../../components/SelectionWrapper';
|
import SelectionWrapper from '../../components/SelectionWrapper';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
@@ -21,6 +21,7 @@ export const NotebookItemWrapper = ({
|
|||||||
}, [selectionMode]);
|
}, [selectionMode]);
|
||||||
|
|
||||||
const onLongPress = () => {
|
const onLongPress = () => {
|
||||||
|
if (item.title === 'General') return;
|
||||||
if (!selectionMode) {
|
if (!selectionMode) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Actions.SELECTION_MODE,
|
type: Actions.SELECTION_MODE,
|
||||||
@@ -36,6 +37,7 @@ export const NotebookItemWrapper = ({
|
|||||||
|
|
||||||
const onPress = () => {
|
const onPress = () => {
|
||||||
if (selectionMode) {
|
if (selectionMode) {
|
||||||
|
console.log(item.title);
|
||||||
onLongPress();
|
onLongPress();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -58,7 +60,11 @@ export const NotebookItemWrapper = ({
|
|||||||
<SelectionWrapper
|
<SelectionWrapper
|
||||||
onLongPress={onLongPress}
|
onLongPress={onLongPress}
|
||||||
pinned={pinned}
|
pinned={pinned}
|
||||||
testID={isTopic? notesnook.ids.topic.get(index) : notesnook.ids.notebook.get(index)}
|
testID={
|
||||||
|
isTopic
|
||||||
|
? notesnook.ids.topic.get(index)
|
||||||
|
: notesnook.ids.notebook.get(index)
|
||||||
|
}
|
||||||
index={index}
|
index={index}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
item={item}>
|
item={item}>
|
||||||
|
|||||||
Reference in New Issue
Block a user