fix: post attachment task not trigger on queue issue

This commit is contained in:
CMK 2021-06-30 16:14:01 +08:00
parent 9460ab2c58
commit 5dc0cb0cc5
1 changed files with 24 additions and 25 deletions

View File

@ -292,11 +292,10 @@ final class ComposeViewModel: NSObject {
.store(in: &disposeBag)
// setup attribute updater
Publishers.CombineLatest(
attachmentServices,
context.timestampUpdatePublisher
)
.sink { attachmentServices, _ in
attachmentServices
.receive(on: DispatchQueue.main)
.debounce(for: 0.3, scheduler: DispatchQueue.main)
.sink { attachmentServices in
// drive service upload state
// make image upload in the queue
for attachmentService in attachmentServices {