mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix: reset progress on operation cancel
This commit is contained in:
@@ -28,12 +28,13 @@ export default class FileStorage {
|
||||
}
|
||||
|
||||
async cancel(groupId, type = undefined) {
|
||||
console.trace("Cancelling", groupId, type);
|
||||
await Promise.all(
|
||||
this._queue
|
||||
.filter(
|
||||
(item) => item.groupId === groupId && (!type || item.type === type)
|
||||
)
|
||||
.map(async (op) => await op.cancel())
|
||||
.map(async (op) => await op.cancel("Operation canceled."))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user