fix state issues

This commit is contained in:
ammarahm-ed
2022-03-09 17:05:34 +05:00
parent 7cf7dbaa65
commit 763de6db41
5 changed files with 103 additions and 96 deletions

View File

@@ -165,6 +165,7 @@ export const useAppEvents = () => {
};
const onSyncComplete = async () => {
console.log('sync complete');
initialize();
setLastSynced(await db.lastSynced());
if (getNote()) {
@@ -219,6 +220,7 @@ export const useAppEvents = () => {
};
const onRequestPartialSync = async (full, force) => {
console.log('auto sync request', full, force);
try {
if (full || force) {
Sync.run('global', force, full);