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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom ImageLoading functions with default arguments not being called #2695

Merged
merged 3 commits into from Jul 5, 2023

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Jul 5, 2023

🔗 Issue Links

#2692

📝 Summary

When providing a custom ImageLoading implementation, some of the functions were not being called. This is because the default implementations provided through the extension in the protocol were using default arguments in the declaration, and this makes Swift think that it is a different function. So the solution is to provide additional declarations without the arguments, which can have default values.

🧪 Manual Testing Notes

N/A for manual QA. Unit Tests were added to proof it works.

☑️ 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 🐞 Bug An issue or PR related to a bug 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK labels Jul 5, 2023
@nuno-vieira nuno-vieira requested a review from a team as a code owner July 5, 2023 11:17
@nuno-vieira nuno-vieira changed the title Fix default arguments of ImageLoading custom implementations Fix custom ImageLoading functions with default arguments not being called Jul 5, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@nuno-vieira nuno-vieira merged commit ce33d9f into develop Jul 5, 2023
17 checks passed
@nuno-vieira nuno-vieira deleted the fix/image-loading-protocol-default-arguments branch July 5, 2023 12:51
@nuno-vieira nuno-vieira mentioned this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants