stakwork / sphinx-mac

Sphinx app for mac desktop
MIT License
4 stars 16 forks source link

Send multiple attachments at a time #418

Open tomastiminskas opened 2 weeks ago

tomastiminskas commented 2 weeks ago

Implement the logic to allow sending multiple attachments together (up to 10) and add ability to select up to 10 files from Finder window when tapping on File option on the new + button menu

Base branch: tt/feature/attachments-preview

General requirements

Specific requirements

Acceptance Criteria

Logic references

  1. NewChatViewModel - func insertProvisionalAttachmentMessageAndUpload: Right now we are creating a provisional message (message record in device db with a provisional id - negative id), then starting the file upload, and finally sending it when upload completed.
  2. AttachmentsManager: func uploadData: in the progress callback of the uploadData method in AttachmentsManager, we are updating the upload progress state of the DataSource item so the row is automatically updated using delegate?.didUpdateUploadProgress and the provisionalMessage?.id

All this logic needs to adapted to allow multiple sendings at a time. Actually the logic needs to be implemented this:

  1. Create the provisional messages for all sending attachments (this will create and show the rows in the chat view)
  2. Start uploading and sending files one at a time so when first completes, then second starts to upload and send
Khaalid-oh commented 2 weeks ago

I can help with this