Skip to content

[Feature]: Migrate from SharedPreferences to Preferences DataStore #3

Description

@kitsumed

Is your feature request related to a problem? Please describe.

I tried migrating the app from SharedPreferences to Preferences DataStore manually, but the added complexity made it confusing.

Since the current implementation is working and Android documentation recommends using DataStore but does not says its a major issue if it is not used, I have decided to keep SharedPreferences for now. However, if anyone is willing to contribute, feel free to take this on or showing me examples.

I am unsure how large this refactoring would be. It might be a major one because of how we currently refresh the UI screens (Compose?), and from my understanding, DataStore introduces Flow, which allows us to be notified as soon as a field is edited.

Describe the solution you'd like

The solution would involve fully migrating from SharedPreferences to Preferences DataStore, ensuring that UI updates and state management continue to work correctly. I think this would also involve using LiveData, didn't look at that yet.

For now, the app continues to work as expected with SharedPreferences. I am not even sure if we would gain any real benefit from migrating compared to the effort required for the refactoring. This issue is mainly here for feedback right now.

This is low priority.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions