A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
Merge branch 'develop' into zustand-state
Ammar Ahmed0d0635ce645f
diff --cc apps/mobile/src/components/NoteItem/wrapper.jsindex 9276c2521,8731bb1ea..4a0831d9d--- a/apps/mobile/src/components/NoteItem/wrapper.js+++ b/apps/mobile/src/components/NoteItem/wrapper.js@@@ -13,14 -14,16 +13,17 @@@ import { TEMPLATE_TRASH } from '../Dialimport SelectionWrapper from '../SelectionWrapper';export const NoteWrapper = React.memo(({item, index}) => {- const [state, dispatch] = useTracked();const isTrash = item.type === 'trash';-+ const setSelectedItem = useSelectionStore(state => state.setSelectedItem);+const onPress = async () => {let _note = db.notes.note(item.id).data;- if (history.selectedItemsList.length > 0 ) {- setSelectedItem(_note);+++ if (history.selectedItemsList.length > 0 && history.selectionMode) {+ dispatch({type: Actions.SELECTED_ITEMS, item: _note});return;+ } else {+ history.selectedItemsList = [];}if (_note.conflicted) {diff --cc apps/mobile/src/components/NotebookItem/wrapper.jsindex 672e3f605,9ffbe124d..9266e935b--- a/apps/mobile/src/components/NotebookItem/wrapper.js+++ b/apps/mobile/src/components/NotebookItem/wrapper.js@@@ -6,13 -7,19 +6,19 @@@ import { history } from '../../utils'import SelectionWrapper from '../SelectionWrapper';export const NotebookWrapper = React.memo(({item, index}) => {- const [state, dispatch] = useTracked();const isTrash = item.type === 'trash';+ const setSelectedItem = useSelectionStore(state => state.setSelectedItem)const onPress = () => {- if (history.selectedItemsList.length > 0) {- setSelectedItem(item);+++ if (history.selectedItemsList.length > 0 && history.selectionMode) {+ dispatch({+ type: Actions.SELECTED_ITEMS,+ item: item,+ });-return;+ } else {+ history.selectedItemsList = [];}let routeName = item.type === "topic" ? 'NotesPage' : 'Notebook';