Skip to content

Added a method for configuring the channel alert type #801

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

Merged
merged 4 commits into from
Apr 9, 2025

Conversation

martinmitrevski
Copy link
Contributor

@martinmitrevski martinmitrevski commented Apr 7, 2025

🔗 Issue Links

Resolves https://linear.app/stream/issue/IOS-771/%5Bswiftui%5D%5Bcare%5D-make-channel-list-error-customizable.

🎯 Goal

Make it easier to configure the error popup in the channel list view.

📝 Summary

Provide bullet points with the most important changes in the codebase.

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@martinmitrevski martinmitrevski requested a review from a team as a code owner April 7, 2025 22:06
@martinmitrevski martinmitrevski marked this pull request as draft April 7, 2025 22:07
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Apr 7, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.21 MB 8.21 MB 0 KB 🟢

@martinmitrevski martinmitrevski marked this pull request as ready for review April 9, 2025 08:18
@@ -217,13 +217,17 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
controller.deleteChannel { [weak self] error in
if error != nil {
// handle error
self?.channelAlertType = .error
self?.setChannelAlertType(.error)
Copy link
Member

@nuno-vieira nuno-vieira Apr 9, 2025

Choose a reason for hiding this comment

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

Does the customer have access to the actual error? 🤔 Otherwise, if they want to display an alert depending on the error type, it will be difficult. To make this more flexible, we should have at least in the future something like we do on the ThreadList, where a customer can totaly customize the Error view by implementing a modifier: https://getstream.io/chat/docs/sdk/ios/swiftui/thread-list/#thread-list-states

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we can expose a modifier in the future. Basically this customer wants to disable all errors.

@martinmitrevski martinmitrevski merged commit 8f3f169 into develop Apr 9, 2025
12 checks passed
@martinmitrevski martinmitrevski deleted the channel-alert-open branch April 9, 2025 11:27
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants