fix new note not created from inside a topic if a note is already opened

This commit is contained in:
ammarahm-ed
2021-11-22 10:03:08 +05:00
parent 05cb000efc
commit 05a9019c69
2 changed files with 7 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ export const Home = ({navigation}) => {
if (!DDS.isTab) {
if (getNote()) {
eSendEvent(eOnLoadNote, {type: 'new'});
editing.currentlyEditing;
editing.currentlyEditing = true;
editing.movedAway = false;
}
tabBarRef.current?.goToPage(1);

View File

@@ -24,6 +24,7 @@ import {
} from '../../utils/Events';
import {openLinkInBrowser} from '../../utils/functions';
import {tabBarRef} from '../../utils/Refs';
import { getNote } from '../Editor/Functions';
const getNotes = params => {
if (!params) return [];
@@ -165,6 +166,11 @@ export const Notes = ({route, navigation}) => {
}
setActionAfterFirstSave();
if (!DDS.isTab) {
if (getNote()) {
eSendEvent(eOnLoadNote, {type: 'new'});
editing.currentlyEditing = true;
editing.movedAway = false;
}
tabBarRef.current?.goToPage(1);
} else {
eSendEvent(eOnLoadNote, {type: 'new'});