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

Refactor news by extracting api, loading and error handling #519

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

steffenkleinle
Copy link
Member

Short description

Refactor news by extracting api, loading and error handling.

Proposed changes

  • Extract fetching of news
  • Extract handling of loading to FutureLoadingScreen
  • Extract error handling to ErrorScreen
  • Improve error handling with better error messages

Side effects

N/A

Testing

Test the news list and single news, reloading, being offline and opening news and by manually throwing errors.

Resolved issues

Fixes: N/A

Additional information

#504 still persists


),
],
),
return FutureLoadingScreen<NewsModel?>(
Copy link
Member Author

Choose a reason for hiding this comment

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

No changes except usage of FutureLoadingScreen instead of duplicated logic

return NewsCard(news: items[index]);
},
);
return FutureLoadingScreen(
Copy link
Member Author

Choose a reason for hiding this comment

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

No changes except usage of FutureLoadingScreen instead of duplicated logic

@steffenkleinle steffenkleinle requested review from NikoHadouken and volkramweber and removed request for NikoHadouken January 16, 2025 14:22
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.

1 participant