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

Switch to compose state and kotlin flows - 1. iteration #267

Closed
3 tasks done
sunkup opened this issue Mar 29, 2024 · 5 comments · Fixed by #279
Closed
3 tasks done

Switch to compose state and kotlin flows - 1. iteration #267

sunkup opened this issue Mar 29, 2024 · 5 comments · Fixed by #279
Assignees
Labels
refactoring Quality improvement of existing functions
Milestone

Comments

@sunkup
Copy link
Member

sunkup commented Mar 29, 2024

Replace LiveData with Compose state where possible. Use kotlin flows if needed/appropriate.

  • Settings
  • SyncWorker
  • SubscriptionsDao

Update their usages accordingly.

Second part

@sunkup sunkup added the refactoring Quality improvement of existing functions label Mar 29, 2024
@sunkup sunkup changed the title Switch to kotlin flows Switch to compose state and kotlin flows Apr 10, 2024
@ArnyminerZ
Copy link
Member

I suggest first creating the methods for Settings, SyncWorker and SubscriptionsDao, with a new name for Flows, and deprecating the other ones. Then we can start migrating the other ones, and once everything is done, remove the deprecated methods.

@sunkup
Copy link
Member Author

sunkup commented Apr 10, 2024

Sounds good. I was also wondering how to approach this :)

@ArnyminerZ
Copy link
Member

Then I'll start on it 😄

@sunkup sunkup changed the title Switch to compose state and kotlin flows Switch to compose state and kotlin flows - 1. iteration Apr 10, 2024
@ArnyminerZ ArnyminerZ self-assigned this Apr 10, 2024
@sunkup sunkup added this to the 2.2.2 milestone Apr 10, 2024
@ArnyminerZ ArnyminerZ linked a pull request Apr 10, 2024 that will close this issue
@ArnyminerZ
Copy link
Member

Now that we are updating the SubscriptionsDao maybe we should consider making all the synchronous methods suspending, to make sure we never block the main thread. At least just as an annotation.

I mean add, delete, getAll...

What do you think @sunkup ?

@sunkup
Copy link
Member Author

sunkup commented Apr 10, 2024

Go for it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Quality improvement of existing functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants