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 preview list fetch mechanism #4501

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

Conversation

Pinaki93
Copy link

@Pinaki93 Pinaki93 commented Mar 2, 2024

Moved the logic to fetch preview reading list to a dedicated repository instead of a helper function. This is a small portion for carrying out major refactoring tasks for T303935

Moves the logic to fetch preview reading list to a dedicated repository instead of a helper function. This is a small portion for carrying out major refactoring tasks for T303935
) {

suspend fun getPreviewReadingList(): ReadingList? {
val encodedJson = prefs.receiveReadingListsData
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be great if use Prefs.receiveReadingListsData directly.

Copy link
Author

Choose a reason for hiding this comment

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

I've converted it to a variable so as to support constructor injection (and easily write tests later with mocks). What do you think?

@Pinaki93 Pinaki93 requested a review from cooltey April 30, 2024 11:28
@cooltey
Copy link
Collaborator

cooltey commented Apr 30, 2024

Hi, would it be possible to change the PreviewReadingListRepositery to ReadingListViewModel and also introduce ViewModel mechanism like we recently did in #4628?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants