Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parallel attachment uploading #3034

Merged
merged 4 commits into from Feb 19, 2024

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Feb 16, 2024

馃敆 Issue Links

Resolves https://github.com/GetStream/ios-issues-tracking/issues/701

馃幆 Goal

Adds parallel attachment uploading

馃摑 Summary

  • Fix back button in Demo App's message list
  • Add parallel attachment uploading

馃洜 Implementation

Before, we were uploading the next attachment only when the current attachment finished uploading. This is not needed at all. We can start all uploads at the same time.

馃帹 Showcase

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2024-02-16.at.18.30.34.mp4

馃И Manual Testing Notes

Scenario 1

  1. Open a channel
  2. Add a message with multiple attachments
  3. All attachments should start uploading at the same time

Scenario 2

  1. Open a channel
  2. Add a message with multiple attachments
  3. Add another message with multiple attachments
  4. Both messages's attachments should uploading at the same time

鈽戯笍 Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero 鈿狅笍 policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

@nuno-vieira nuno-vieira added 馃寪聽SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK 鉁吢燜eature An issue or PR related to a feature labels Feb 16, 2024
@nuno-vieira nuno-vieira requested a review from a team as a code owner February 16, 2024 18:25
@nuno-vieira nuno-vieira force-pushed the add/parallel-attachment-uploading branch from 7b166cd to 927b897 Compare February 16, 2024 18:25
Copy link

sonarcloud bot commented Feb 16, 2024

Comment on lines +66 to 68
newAttachmentIds.forEach {
pendingAttachmentIDs.insert($0)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative could be pendingAttachmentIDs.formUnion(newAttachmentIds). But it does not matter much.

@laevandus
Copy link
Contributor

@nuno-vieira The flickering in the gallery view is going to be taken care by a separate issue?

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great improvement 馃憦 I also tested on SwiftUI, it works well there too.
Do we have a follow up about/ideas to fix the flickering?

@nuno-vieira
Copy link
Member Author

@laevandus @martinmitrevski The flickering requires rebuilding the Gallery View, unfortunately, so we would need a new GalleryViewInjector implementation.

@nuno-vieira nuno-vieira merged commit eadd7d8 into develop Feb 19, 2024
5 checks passed
@nuno-vieira nuno-vieira deleted the add/parallel-attachment-uploading branch February 19, 2024 10:43
@nuno-vieira nuno-vieira mentioned this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
鉁吢燜eature An issue or PR related to a feature 馃寪聽SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants