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
minor improvement in performance
ammarahm-ed5c30d1aa84b9
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/AddNotebookDialog/index.jsindex 35de29a64..9848a06f3 100644--- a/apps/mobile/src/components/AddNotebookDialog/index.js+++ b/apps/mobile/src/components/AddNotebookDialog/index.js@@ -54,11 +54,11 @@ export class AddNotebookDialog extends React.Component {if (toEdit && toEdit.type === 'notebook') {let topicsList = [];- toEdit.topics.forEach((item) => {- if (item.id !== 'General') {+ toEdit.topics.forEach((item, index) => {+ if (index === 0)return;topicsList.push(item.title);- }});+ console.log(topicsList);this.id = toEdit.id;this.title = toEdit.title;this.description = toEdit.description;@@ -95,19 +95,16 @@ export class AddNotebookDialog extends React.Component {let {topics} = this.state;let prevTopics = topics;refs = [];- console.log(prevTopics);prevTopics.splice(index, 1);let edit = this.props.toEdit;- console.log(edit);if (edit && edit.id) {- let topicToDelete = edit.topics[index];+ let topicToDelete = edit.topics[index + 1];console.log(topicToDelete)if (topicToDelete) {this.topicsToDelete.push(topicToDelete.id);}}let nextTopics = [...prevTopics];- console.log(nextTopics);if (this.prevIndex === index) {this.prevIndex = null;this.prevItem = null;@@ -147,7 +144,6 @@ export class AddNotebookDialog extends React.Component {}}if (id) {- console.log('topics to delete',this.topicsToDelete?.length)if (this.topicsToDelete?.length > 0) {await db.notebooks@@ -155,7 +151,6 @@ export class AddNotebookDialog extends React.Component {.topics.delete(...this.topicsToDelete);toEdit = db.notebooks.notebook(toEdit.id).data;}- console.log(toEdit.topics);await db.notebooks.add({title: this.title,@@ -175,7 +170,7 @@ export class AddNotebookDialog extends React.Component {nextTopics.push(title);}});- console.log('nextTopics',nextTopics);+await db.notebooks.notebook(id).topics.add(...nextTopics);} else {await db.notebooks.add({diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/AddTopicDialog/index.jsindex 62b89b5b0..69fa60ddf 100644--- a/apps/mobile/src/components/AddTopicDialog/index.js+++ b/apps/mobile/src/components/AddTopicDialog/index.js@@ -49,7 +49,6 @@ export class AddTopicDialog extends React.Component {});}close() {- refs = [];this.title = null;this.setState({visible: false,diff --git a/apps/mobile/src/components/Header/HeaderLeftMenu.js b/apps/mobile/src/components/Header/HeaderLeftMenu.jsnew file mode 100644index 000000000..a4a8b6a2b--- /dev/null+++ b/apps/mobile/src/components/Header/HeaderLeftMenu.js@@ -0,0 +1,45 @@+import React from 'react';+import {useTracked} from '../../provider';+import {SIZE} from "../../utils/SizeUtils";+import {DDS} from "../../services/DeviceDetection";+import {ActionIcon} from "../ActionIcon";+import NavigationService from "../../services/Navigation";++export const HeaderLeftMenu = () => {+ const [state,] = useTracked();+ const {colors, headerMenuState} = state;++ const onLeftButtonPress = () => {+ if (headerMenuState) {+ NavigationService.openDrawer();+ return;+ }+ NavigationService.goBack();+ };++ return (+ <>+ {!DDS.isTab ? (+ <ActionIcon+ testID="left_menu_button"+ customStyle={{+ justifyContent: 'center',+ alignItems: 'center',+ height: 40,+ width: 40,+ borderRadius: 100,+ marginLeft: -5,+ marginRight: 25,+ }}+ onPress={onLeftButtonPress}+ name={!headerMenuState ? 'arrow-left' : 'menu'}+ size={SIZE.xxxl}+ color={colors.pri}+ iconStyle={{+ marginLeft: !headerMenuState ? -5 : 0,+ }}+ />+ ) : undefined}+ </>+ );+};diff --git a/apps/mobile/src/components/Header/HeaderMenu.js b/apps/mobile/src/components/Header/HeaderMenu.jsindex 179eaa05e..aa6c1ee12 100644--- a/apps/mobile/src/components/Header/HeaderMenu.js+++ b/apps/mobile/src/components/Header/HeaderMenu.js@@ -11,7 +11,6 @@ export const HeaderMenu = () => {return headerVerticalMenu ? (<Menu-ref={menuRef}animationDuration={200}style={{diff --git a/apps/mobile/src/components/Header/index.js b/apps/mobile/src/components/Header/index.jsindex 943e41f42..0fc13e8d3 100644--- a/apps/mobile/src/components/Header/index.js+++ b/apps/mobile/src/components/Header/index.js@@ -4,30 +4,21 @@ import * as Animatable from 'react-native-animatable';import {useSafeAreaInsets} from 'react-native-safe-area-context';import {useTracked} from '../../provider';import {eSendEvent} from '../../services/EventManager';-import NavigationService from '../../services/Navigation';import {useHideHeader} from '../../utils/Hooks';import {dWidth} from '../../utils';import {ActionIcon} from '../ActionIcon';import {HeaderMenu} from './HeaderMenu';import {HeaderTitle} from './HeaderTitle';import {SIZE} from "../../utils/SizeUtils";-import {DDS} from "../../services/DeviceDetection";+import {HeaderLeftMenu} from "./HeaderLeftMenu";export const Header = ({showSearch, root}) => {- const [state, dispatch] = useTracked();- const {colors, syncing, headerState} = state;+ const [state, ] = useTracked();+ const {colors, syncing} = state;const insets = useSafeAreaInsets();const hideHeader = useHideHeader();- const onLeftButtonPress = () => {- if (!headerState.canGoBack) {- NavigationService.openDrawer();- return;- }- NavigationService.goBack();- };-return (<Viewstyle={[@@ -39,20 +30,7 @@ export const Header = ({showSearch, root}) => {},]}><View style={styles.leftBtnContainer}>- {!DDS.isTab ? (- <ActionIcon- testID="left_menu_button"- customStyle={styles.leftBtn}- onPress={onLeftButtonPress}- name={headerState.canGoBack ? 'arrow-left' : 'menu'}- size={SIZE.xxxl}- color={colors.pri}- iconStyle={{- marginLeft: headerState.canGoBack ? -5 : 0,- }}- />- ) : undefined}-+ <HeaderLeftMenu/>{Platform.OS === 'android' ? <HeaderTitle root={root} /> : null}</View>{Platform.OS !== 'android' ? <HeaderTitle root={root} /> : null}diff --git a/apps/mobile/src/components/Menu/MenuListItem.js b/apps/mobile/src/components/Menu/MenuListItem.jsindex b495cebed..e6e7c4be1 100644--- a/apps/mobile/src/components/Menu/MenuListItem.js+++ b/apps/mobile/src/components/Menu/MenuListItem.js@@ -16,17 +16,21 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {const {currentScreen, colors} = state;const _onPress = (event) => {- if (!ignore) {+ if (!ignore && currentScreen !== item.name.toLowerCase()) {dispatch({type: Actions.HEADER_TEXT_STATE,state: {heading: item.name,},});+ dispatch({+ type: Actions.HEADER_VERTICAL_MENU,+ state: item.name === "Home",+ });eSendEvent(eClearSearch);}-item.func();+if (item.close) {NavigationService.closeDrawer();}@@ -38,8 +42,7 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {key={item.name + index}onPress={_onPress}onLongPress={(event) => {- console.log(event.nativeEvent);- showContext(event, item.name);+ showContext(event, item.name).then(r => r);}}color={currentScreen === item.name.toLowerCase() ? colors.shade : 'transparent'diff --git a/apps/mobile/src/components/Menu/index.js b/apps/mobile/src/components/Menu/index.jsindex 6d160e85b..8dd1614ee 100644--- a/apps/mobile/src/components/Menu/index.js+++ b/apps/mobile/src/components/Menu/index.js@@ -1,20 +1,12 @@import React from 'react';import {- Platform,- SafeAreaView,ScrollView,StatusBar,- TouchableOpacity,View,} from 'react-native';-import {createAnimatableComponent} from 'react-native-animatable';--import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import {useTracked} from '../../provider';import {Actions} from '../../provider/Actions';import NavigationService from '../../services/Navigation';-import {sideMenuRef} from '../../utils/Refs';-import {dWidth} from '../../utils';import {ColorSection} from './ColorSection';import {MenuListItem} from './MenuListItem';import {TagsSection} from './TagsSection';@@ -22,16 +14,13 @@ import {UserSection} from './UserSection';import Seperator from '../Seperator';import {useSafeAreaInsets} from 'react-native-safe-area-context';import {ACCENT, COLOR_SCHEME, COLOR_SCHEME_DARK, COLOR_SCHEME_LIGHT, setColorScheme} from "../../utils/Colors";-import {ph, SIZE} from "../../utils/SizeUtils";-import {DDS} from "../../services/DeviceDetection";+import {MMKV} from "../../utils/MMKV";export const Menu = ({close = () => {},hide,- update = () => {},noTextMode = false,- onButtonLongPress = () => {},}) => {const [state, dispatch] = useTracked();const {colors} = state;@@ -86,7 +75,7 @@ export const Menu = ({}},switch: true,- on: colors.night ? true : false,+ on: !!colors.night,close: false,},{diff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.jsindex c5414c556..b662ce2df 100644--- a/apps/mobile/src/components/SearchInput/index.js+++ b/apps/mobile/src/components/SearchInput/index.js@@ -24,7 +24,6 @@ export const Search = (props) => {const [text, setText] = useState('');const [focus, setFocus] = useState(false);-const _marginAnim = new Value(0);const _opacity = new Value(1);const _borderAnim = new Value(1.5);@@ -145,7 +144,7 @@ export const Search = (props) => {);if (!searchResult || searchResult.length === 0) {ToastEvent.show('No search results found for ' + text, 'error');- return;+} else {dispatch({type: Actions.SEARCH_RESULTS,@@ -219,9 +218,7 @@ export const Search = (props) => {/><Iconstyle={{paddingRight: DDS.isTab ? 12 : 12}}- onPress={() => {- onSubmitEditing();- }}+ onPress={onSubmitEditing}name="magnify"color={focusdiff --git a/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js b/apps/mobile/src/components/SimpleList/NotebookItemWrapper.jsindex b4ea00cba..6427be430 100644--- a/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js+++ b/apps/mobile/src/components/SimpleList/NotebookItemWrapper.js@@ -45,16 +45,7 @@ export const NotebookItemWrapper = ({});dispatch({type: Actions.HEADER_STATE,- state: {- canGoBack: true,- menu: false,- },- });- dispatch({- type: Actions.CONTAINER_BOTTOM_BUTTON,- state: {- bottomButtonText: 'Add new topic',- },+ state:false,});NavigationService.navigate('Notebook', {diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.jsindex f8f0b40d8..87ceaf3ba 100644--- a/apps/mobile/src/components/SimpleList/index.js+++ b/apps/mobile/src/components/SimpleList/index.js@@ -58,7 +58,6 @@ const SimpleList = ({: listData;let d = [header, ...mainData];- console.log(d,"D");setDataProvider(dataProvider.cloneWithRows(d),);@@ -135,7 +134,7 @@ const SimpleList = ({return dataProvider.getDataForIndex(index).type;},(type, dim) => {- console.log(type);+switch (type) {case 'note':dim.width = width;diff --git a/apps/mobile/src/provider/DefaultState.js b/apps/mobile/src/provider/DefaultState.jsindex 8d164774c..e5a6c4bba 100644--- a/apps/mobile/src/provider/DefaultState.js+++ b/apps/mobile/src/provider/DefaultState.js@@ -16,7 +16,7 @@ export const defaultState = {tags: [],colorNotes: [],user: {},- premiumUser:false,+ premiumUser:true,settings: {showToolbarOnTop: false,showKeyboardOnOpen: false,@@ -55,15 +55,9 @@ export const defaultState = {type: null,keyword: null,},- headerState: {- heading: 'Home',- canGoBack: true,- menu: false,- verticalMenu: false,- headerColor: null,- },+ headerMenuState: true,headerTextState: {- heading: 'Notes',+ heading: 'Home',color: null,},headerVerticalMenu: true,diff --git a/apps/mobile/src/provider/Reducer.js b/apps/mobile/src/provider/Reducer.jsindex f593779e0..c19f3bea9 100644--- a/apps/mobile/src/provider/Reducer.js+++ b/apps/mobile/src/provider/Reducer.js@@ -192,13 +192,10 @@ export const reducer = (state, action) => {};}case Actions.HEADER_STATE: {- let header = {- ...state.headerState,- ...action.state,- };+return {...state,- headerState: header,+ headerMenuState:action.state};}case Actions.SEARCH_STATE: {diff --git a/apps/mobile/src/utils/index.js b/apps/mobile/src/utils/index.jsindex 03b9b269c..18aecc553 100755--- a/apps/mobile/src/utils/index.js+++ b/apps/mobile/src/utils/index.js@@ -39,6 +39,8 @@ export const history = {selectedItemsList: [],};++export async function showContext(event, title) {eSendEvent('showContextMenu', {location: {diff --git a/apps/mobile/src/views/Favorites/index.js b/apps/mobile/src/views/Favorites/index.jsindex 7dad08c14..131dee132 100644--- a/apps/mobile/src/views/Favorites/index.js+++ b/apps/mobile/src/views/Favorites/index.js@@ -7,23 +7,18 @@ import {Actions} from '../../provider/Actions';export const Favorites = ({route, navigation}) => {const [state, dispatch] = useTracked();const {favorites} = state;- const [refreshing, setRefreshing] = useState(false);const onFocus = useCallback(() => {dispatch({type: Actions.HEADER_STATE,state: {- type: 'notes',menu: true,- canGoBack: false,- color: null,},});-dispatch({type: Actions.HEADER_TEXT_STATE,state: {- heading: 'Favorites',+ heading: "Favorites",},});dispatch({@@ -36,7 +31,6 @@ export const Favorites = ({route, navigation}) => {color: null,},});-dispatch({type: Actions.CURRENT_SCREEN,screen: 'favorites',@@ -73,7 +67,6 @@ export const Favorites = ({route, navigation}) => {refreshCallback={() => {dispatch({type: Actions.FAVORITES});}}- refreshing={refreshing}focused={() => navigation.isFocused()}RenderItem={NoteItemWrapper}placeholder={<Placeholder type="favorites" />}diff --git a/apps/mobile/src/views/Folders/index.js b/apps/mobile/src/views/Folders/index.jsindex 655b95a16..526d038bf 100644--- a/apps/mobile/src/views/Folders/index.js+++ b/apps/mobile/src/views/Folders/index.js@@ -6,21 +6,19 @@ import {NotebookItemWrapper} from '../../components/SimpleList/NotebookItemWrappimport {useTracked} from '../../provider';import {Actions} from '../../provider/Actions';import {ContainerBottomButton} from '../../components/Container/ContainerBottomButton';-import note from "notes-core/models/note";-import notebook from "notes-core/models/notebook";export const Folders = ({route, navigation}) => {const [state, dispatch] = useTracked();const {notebooks} = state;- const params = route.params;const onFocus = useCallback(() => {dispatch({type: Actions.HEADER_STATE,+ state: true,+ });+ dispatch({+ type: Actions.HEADER_TEXT_STATE,state: {- type: 'notebooks',- menu: true,- canGoBack: false,- color: null,+ heading: "Notebooks",},});dispatch({@@ -33,25 +31,12 @@ export const Folders = ({route, navigation}) => {color: null,},});-- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,- });- dispatch({- type: Actions.HEADER_TEXT_STATE,- state: {- heading: params.title,- },- });- dispatch({type: Actions.PINNED});dispatch({type: Actions.NOTEBOOKS});dispatch({type: Actions.CURRENT_SCREEN,screen: 'notebooks',});- console.log(notebooks)- }, []);+ }, [notebooks]);useEffect(() => {navigation.addListener('focus', onFocus);diff --git a/apps/mobile/src/views/Home/index.js b/apps/mobile/src/views/Home/index.jsindex 9de2dda65..06c0bb713 100755--- a/apps/mobile/src/views/Home/index.js+++ b/apps/mobile/src/views/Home/index.js@@ -16,20 +16,21 @@ export const Home = ({navigation}) => {const onFocus = useCallback(() => {dispatch({- type: Actions.CURRENT_SCREEN,- screen: 'home',+ type: Actions.HEADER_VERTICAL_MENU,+ state: true,});dispatch({- type: Actions.HEADER_STATE,+ type: Actions.HEADER_TEXT_STATE,state: {- type: 'notes',- menu: true,- canGoBack: false,- color: null,+ heading: "Home",},});dispatch({- type: Actions.HEADER_VERTICAL_MENU,+ type: Actions.CURRENT_SCREEN,+ screen: 'home',+ });+ dispatch({+ type: Actions.HEADER_STATE,state: true,});dispatch({@@ -42,23 +43,12 @@ export const Home = ({navigation}) => {color: null,},});- dispatch({- type: Actions.HEADER_TEXT_STATE,- state: {- heading: 'Home',- },- });eSendEvent(eScrollEvent, 0);dispatch({type: Actions.COLORS});dispatch({type: Actions.NOTES});- }, []);+ }, [notes]);const onBlur = useCallback(() => {- console.log(navigation.isFocused());- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,- });}, []);useEffect(() => {@@ -113,6 +103,7 @@ export const Home = ({navigation}) => {title="Create a new note"onPress={_onPressBottomButton}/>+</>);};diff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/views/Notebook/index.jsindex 06261f918..6b2f1c4b7 100644--- a/apps/mobile/src/views/Notebook/index.js+++ b/apps/mobile/src/views/Notebook/index.js@@ -13,7 +13,6 @@ import {} from '../../services/EventManager';import {eOnNewTopicAdded, eScrollEvent} from '../../utils/Events';import NavigationService from '../../services/Navigation';-import { Dimensions } from 'react-native';import {db} from "../../utils/DB";export const Notebook = ({route, navigation}) => {@@ -42,14 +41,11 @@ export const Notebook = ({route, navigation}) => {const onFocus = useCallback(() => {onLoad();+dispatch({- type: Actions.HEADER_STATE,+ type: Actions.HEADER_TEXT_STATE,state: {- type: 'topics',- menu: false,- canGoBack: true,heading: params.title,- color: null,},});dispatch({@@ -62,19 +58,6 @@ export const Notebook = ({route, navigation}) => {color: null,},});-- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,- });-- dispatch({- type: Actions.HEADER_TEXT_STATE,- state: {- heading: params.title,- },- });-dispatch({type: Actions.CURRENT_SCREEN,screen: 'notebook',@@ -135,11 +118,7 @@ export default Notebook;const RenderItem = ({item, index}) => {const [state, dispatch] = useTracked();- const {colors, selectionMode, preventDefaultMargins} = state;- let headerState = preventDefaultMargins- ? state.indHeaderState- : state.headerState;- let params = headerState.route.params ? headerState.route.params : {};+ const {colors,selectionMode } = state;return (<SelectionWrapper@@ -162,20 +141,15 @@ const RenderItem = ({item, index}) => {}}item={item}><NotebookItem- hideMore={preventDefaultMargins}isTopic={true}customStyle={{width: '100%',marginHorizontal: 0,}}selectionMode={selectionMode}- noteToMove={params.note}- notebookID={params.notebook?.id}- isMove={preventDefaultMargins}item={item}index={index}colors={colors}- data={params.notebook?.topics}/></SelectionWrapper>);diff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/views/Notes/index.jsindex 58832f7da..29c7d13a3 100644--- a/apps/mobile/src/views/Notes/index.js+++ b/apps/mobile/src/views/Notes/index.js@@ -26,11 +26,10 @@ export const Notes = ({route, navigation}) => {const {colorNotes} = state;const allNotes = state.notes;const [notes, setNotes] = useState([]);- const [refreshing, setRefreshing] = useState(false);let params = route.params ? route.params : null;useEffect(() => {- if (isFocused) {+ if (navigation.isFocused()) {if (!params) {params = {title: 'Notes',@@ -43,7 +42,7 @@ export const Notes = ({route, navigation}) => {type: null,};}- }, [isFocused, allNotes, colorNotes]);+ }, [allNotes, colorNotes]);useEffect(() => {eSubscribeEvent(refreshNotesPage, init);@@ -64,7 +63,7 @@ export const Notes = ({route, navigation}) => {eSendEvent(eScrollEvent, 0);if (params.type === 'tag') {allNotes = db.notes.tagged(params.tag.title);- } else if (params.type == 'color') {+ } else if (params.type === 'color') {allNotes = db.notes.colored(params.color.title);} else {allNotes = db.notebooks@@ -79,22 +78,13 @@ export const Notes = ({route, navigation}) => {const onFocus = useCallback(() => {dispatch({type: Actions.HEADER_STATE,- state: {- type: 'notes',- menu: params.type === 'color' ? true : false,- canGoBack: params.type === 'color' ? false : true,- color: params.type == 'color' ? COLORS_NOTE[params.title] : null,- },- });- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,+ state: params.type === 'color',});dispatch({type: Actions.HEADER_TEXT_STATE,state: {heading:- params.type == 'tag'+ params.type === 'tag'? '# ' + params.title: params.title.slice(0, 1).toUpperCase() + params.title.slice(1),},@@ -128,12 +118,12 @@ export const Notes = ({route, navigation}) => {type: Actions.SEARCH_STATE,state: {placeholder: `Search in ${- params.type == 'tag' ? '#' + params.title : params.title+ params.type === 'tag' ? '#' + params.title : params.title}`,data: notes,noSearch: false,type: 'notes',- color: params.type == 'color' ? params.title : null,+ color: params.type === 'color' ? params.title : null,},});}@@ -145,7 +135,7 @@ export const Notes = ({route, navigation}) => {type: 'tag',id: params.tag.title,};- } else if (params.type == 'color') {+ } else if (params.type === 'color') {editing.actionAfterFirstSave = {type: 'color',id: params.color.id,diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.jsindex 7cc002cd5..14d269a02 100644--- a/apps/mobile/src/views/Settings/index.js+++ b/apps/mobile/src/views/Settings/index.js@@ -57,31 +57,20 @@ export const Settings = ({ navigation}) => {}const onFocus = useCallback(() => {- dispatch({- type: Actions.HEADER_STATE,- state: {- type: null,- menu: true,- canGoBack: false,- color: null,- },- });- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,- });-- dispatch({- type: Actions.HEADER_TEXT_STATE,- state: {- heading: 'Settings',- },- });+ dispatch({+ type: Actions.HEADER_STATE,+ state: true,+ });+ dispatch({+ type: Actions.HEADER_TEXT_STATE,+ state: {+ heading: "Settings",+ },+ });dispatch({type: Actions.CURRENT_SCREEN,screen: 'settings',});-dispatch({type: Actions.SEARCH_STATE,state: {diff --git a/apps/mobile/src/views/Tags/index.js b/apps/mobile/src/views/Tags/index.jsindex 474ff9977..f6ab89f4b 100644--- a/apps/mobile/src/views/Tags/index.js+++ b/apps/mobile/src/views/Tags/index.js@@ -16,23 +16,14 @@ export const Tags = ({route, navigation}) => {const onFocus = useCallback(() => {dispatch({type: Actions.HEADER_STATE,- state: {- type: 'trash',- menu: true,- canGoBack: false,- color: null,- },- });- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,+ state: true,});dispatch({type: Actions.HEADER_TEXT_STATE,state: {- heading: 'Tags',+ heading:"Tags",},- });+ });dispatch({type: Actions.SEARCH_STATE,state: {diff --git a/apps/mobile/src/views/Trash/index.js b/apps/mobile/src/views/Trash/index.jsindex 020f2b1e9..7b08fb3da 100644--- a/apps/mobile/src/views/Trash/index.js+++ b/apps/mobile/src/views/Trash/index.js@@ -16,22 +16,12 @@ export const Trash = ({route, navigation}) => {const onFocus = useCallback(() => {dispatch({type: Actions.HEADER_STATE,- state: {- type: 'trash',- menu: true,- canGoBack: false,- color: null,- },+ state: true,});- dispatch({- type: Actions.HEADER_VERTICAL_MENU,- state: false,- });-dispatch({type: Actions.HEADER_TEXT_STATE,state: {- heading: 'Trash',+ heading: "Trash",},});dispatch({@@ -48,7 +38,6 @@ export const Trash = ({route, navigation}) => {dispatch({type: Actions.TRASH,});-dispatch({type: Actions.CURRENT_SCREEN,screen: 'trash',