minor refactor

This commit is contained in:
ammarahm-ed
2020-05-10 22:21:31 +05:00
parent 0d0f4cddbe
commit dab42a2e35
2 changed files with 16 additions and 11 deletions

View File

@@ -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: