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/no internet connection on hub apps #808

Conversation

makeevrserg
Copy link
Collaborator

Background

On Hub/Apps screen displayed multiple error placeholders when categories and list could not be loaded. There's should be either displayed categories with list error or fullscreen error in case categories could not be loaded

Changes

  • Removed entirely error placeholder from ComposableCategories as it's not required now
  • Block list error display when categories error happened
  • Add fullscreen LazyColumn error display

Test plan

  • Get Charles or HTTP Toolkit to simultate url timeouts or just disable internet on phone
  • Open Hub>Apps
  • Await categories loaded and simulate error for list below to see it's error placeholder
  • Restart app with no internet to see fullscreen error placeholder on this screen when categories not loaded

Comment on lines 17 to 19
(categoriesLoadState as? CategoriesLoadState.Error)
?.throwable
?.toFapHubError()
Copy link
Member

Choose a reason for hiding this comment

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

I think

 (categoriesLoadState as? CategoriesLoadState.Error)
        ?.throwable
        ?.toFapHubError()

should be in remember

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed remember and removed overhead

@makeevrserg makeevrserg requested a review from LionZXY April 4, 2024 17:20
Copy link
Member

@LionZXY LionZXY left a comment

Choose a reason for hiding this comment

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

Thank you for this elegant solution!

@makeevrserg makeevrserg added this pull request to the merge queue Apr 5, 2024
Merged via the queue into flipperdevices:dev with commit 381b8d0 Apr 5, 2024
5 checks passed
@makeevrserg makeevrserg deleted the fix/no-internet-connection-on-hub_apps branch April 5, 2024 09:36
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.

2 participants