-
Notifications
You must be signed in to change notification settings - Fork 87
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 Channel List stuck in Empty View State in rare conditions #639
Fix Channel List stuck in Empty View State in rare conditions #639
Conversation
if channels.isEmpty { | ||
loading = networkReachability.isNetworkAvailable() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinmitrevski I can probably revert this, since it is not related, but this means that for simulators, the loading view will never appear, and while doing development this can be annoying, especially because most devs initially use the simulator to test things.
Ideally, in the future we should try to follow the Thread List v2 approach, where when there is already a cache, and the data is loading, we show a loading spinner in the header view. As well, as a loading spinner on the footer view when loading more data. (This useful especially in low network conditions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not update this logic for simulators only? (Keep everything as is for regular devices)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is going to complicate the code IMO. I think we should align this with UIKit, besides that it is usually not a good practice using network reachability for things that can potentially block user interaction 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, if it's this way on UIKit, let's keep it like this.
SDK Size
|
Quality Gate passedIssues Measures |
🔗 Issue Link
Resolves https://stream-io.atlassian.net/browse/PBE-6291
🎯 Goal
Fix the Channel List stuck in Empty View State in rare conditions.
🛠 Implementation
NetworkReachibility
won't work well in the simulator. Either way, the loading view should only depend on whether there is an available local cache or not, not if there is a network available since this could cause unpredictable behaviour.🧪 Testing
N/A. Not really testable in the Demo App, but the customer confirmed the solution works.
☑️ Checklist