mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
minor refactor
This commit is contained in:
@@ -90,14 +90,14 @@ export const ActionSheetComponent = ({
|
||||
if (tag.includes(',')) {
|
||||
tag = tag.replace(',', '');
|
||||
}
|
||||
tagsInputRef.current?.setNativeProps({
|
||||
text: '',
|
||||
});
|
||||
|
||||
await db.notes.note(note.id).tag(tag);
|
||||
|
||||
setNote({...db.notes.note(note.id).data});
|
||||
dispatch({type: ACTIONS.TAGS});
|
||||
tagsInputRef.current?.setNativeProps({
|
||||
text: '',
|
||||
});
|
||||
tagToAdd = '';
|
||||
};
|
||||
|
||||
@@ -351,7 +351,6 @@ export const ActionSheetComponent = ({
|
||||
.catch(async e => {
|
||||
switch (e.message) {
|
||||
case db.vault.ERRORS.noVault:
|
||||
|
||||
close('novault');
|
||||
break;
|
||||
case db.vault.ERRORS.vaultLocked:
|
||||
|
||||
@@ -12,13 +12,17 @@ import Signup from '../../views/Signup';
|
||||
import {updateEvent} from '../DialogManager/recievers';
|
||||
import {NavigationContainer} from '@react-navigation/native';
|
||||
import {createStackNavigator} from '@react-navigation/stack';
|
||||
import Container from '../Container';
|
||||
|
||||
const Stack = createStackNavigator();
|
||||
|
||||
const modalNavigatorRef2 = createRef();
|
||||
|
||||
const ModalNavigator = ({onStateChange}) => {
|
||||
return (
|
||||
<NavigationContainer onStateChange={onStateChange} independent={true} ref={modalNavigatorRef2}>
|
||||
<NavigationContainer
|
||||
onStateChange={onStateChange}
|
||||
independent={true}
|
||||
ref={modalNavigatorRef2}>
|
||||
<Stack.Navigator
|
||||
initialRouteName="Login"
|
||||
screenOptions={{
|
||||
@@ -127,11 +131,13 @@ class LoginDialog extends React.Component {
|
||||
paddingVertical: 16,
|
||||
zIndex: 10,
|
||||
}}>
|
||||
<Container>
|
||||
<ModalNavigator
|
||||
onStateChange={event => {
|
||||
this.routeIndex = event.index;
|
||||
}}
|
||||
/>
|
||||
</Container>
|
||||
</View>
|
||||
</Animatable.View>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user