mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
feat: send progress events during sync
This commit is contained in:
@@ -19,6 +19,14 @@ export function sendAttachmentsProgressEvent(type, groupId, total, current) {
|
||||
});
|
||||
}
|
||||
|
||||
export function sendSyncProgressEvent(type, total, current) {
|
||||
EV.publish(EVENTS.syncProgress, {
|
||||
type,
|
||||
total,
|
||||
current: current === undefined ? total : current,
|
||||
});
|
||||
}
|
||||
|
||||
export const CLIENT_ID = "notesnook";
|
||||
|
||||
export const CHECK_IDS = {
|
||||
@@ -41,6 +49,7 @@ export const EVENTS = {
|
||||
userSignedUp: "user:signedUp",
|
||||
userSessionExpired: "user:sessionExpired",
|
||||
databaseSyncRequested: "db:syncRequested",
|
||||
syncProgress: "sync:progress",
|
||||
databaseMigrated: "db:migrated",
|
||||
databaseUpdated: "db:updated",
|
||||
databaseCollectionInitiated: "db:collectionInitiated",
|
||||
|
||||
Reference in New Issue
Block a user