Skip to content

Commit 9509aeb

Browse files
committed
Use async onUpdate callback
1 parent d8d4ad9 commit 9509aeb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/attachments/src/AttachmentQueue.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export class AttachmentQueue {
1818
logger?: ILogger;
1919
syncThrottleDuration: number;
2020
downloadAttachments: boolean = true;
21-
watchActiveAbortController?: AbortController;
2221
archivedCacheLimit: number;
2322
attachmentService: AttachmentService;
2423

@@ -37,7 +36,7 @@ export class AttachmentQueue {
3736
db: AbstractPowerSyncDatabase;
3837
remoteStorage: RemoteStorageAdapter;
3938
localStorage: LocalStorageAdapter;
40-
watchAttachments: (onUpdate: (attachement: WatchedAttachmentItem[]) => void) => void;
39+
watchAttachments: (onUpdate: (attachement: WatchedAttachmentItem[]) => Promise<void>) => void;
4140
tableName?: string;
4241
logger?: ILogger;
4342
syncIntervalMs?: number;
@@ -58,8 +57,6 @@ export class AttachmentQueue {
5857
this.archivedCacheLimit = archivedCacheLimit;
5958
}
6059

61-
watchAttachments(onUpdate: (attachement: WatchedAttachmentItem[]) => void): void {
62-
throw new Error('watchAttachments not implemented');
6360
}
6461

6562
async startSync(): Promise<void> {

0 commit comments

Comments
 (0)