summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src/dbevents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-30 16:47:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-30 16:47:09 +0300
commit0a8a140351a533e2fb895228589efd2846b9c697 (patch)
treeea9b92130b2f6ab7304e496f20f8b88e0d7ca78f /plugins/Dbx_mdbx/src/dbevents.cpp
parent3166b70501ec138496e04140f82147ea23d82420 (diff)
fix for asynchronous database flush to fix unsaved data
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbevents.cpp')
-rw-r--r--plugins/Dbx_mdbx/src/dbevents.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp
index 4ad32afe54..ad8d478b73 100644
--- a/plugins/Dbx_mdbx/src/dbevents.cpp
+++ b/plugins/Dbx_mdbx/src/dbevents.cpp
@@ -134,6 +134,8 @@ STDMETHODIMP_(MEVENT) CDbxMDBX::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
return 0;
}
+ DBFlush();
+
// Notify only in safe mode or on really new events
if (m_safetyMode)
NotifyEventHooks(hEventAddedEvent, contactNotifyID, dwEventId);
@@ -214,6 +216,7 @@ STDMETHODIMP_(BOOL) CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
return 1;
}
+ DBFlush();
NotifyEventHooks(hEventDeletedEvent, contactID, hDbEvent);
return 0;
}
@@ -340,6 +343,7 @@ STDMETHODIMP_(BOOL) CDbxMDBX::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
return -1;
}
+ DBFlush();
NotifyEventHooks(hEventMarkedRead, contactID, (LPARAM)hDbEvent);
return wRetVal;
}