fix note not updating on lock

This commit is contained in:
ammarahm-ed
2020-04-15 17:05:57 +05:00
parent 47c37996a4
commit 0ac04efff8

View File

@@ -26,7 +26,8 @@ import { useTracked } from '../../provider';
import { ACTIONS } from '../../provider/actions'; import { ACTIONS } from '../../provider/actions';
import NavigationService from '../../services/NavigationService'; import NavigationService from '../../services/NavigationService';
import { timeConverter, ToastEvent, DDS, db } from '../../utils/utils'; import { timeConverter, ToastEvent, DDS, db } from '../../utils/utils';
import { openVault } from '../../services/eventManager'; import { openVault, eSendEvent } from '../../services/eventManager';
import { refreshNotesPage } from '../../services/events';
const w = Dimensions.get('window').width; const w = Dimensions.get('window').width;
const h = Dimensions.get('window').height; const h = Dimensions.get('window').height;
@@ -343,6 +344,9 @@ export const ActionSheetComponent = ({
db.vault db.vault
.add(note.id) .add(note.id)
.then(() => { .then(() => {
dispatch({ type: ACTIONS.NOTES })
eSendEvent(refreshNotesPage);
dispatch({ type: ACTIONS.PINNED });
close(); close();
}) })
.catch(async e => { .catch(async e => {