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

Add shared preferences into the app. #13

Closed
justdvnsh opened this issue Oct 4, 2021 · 4 comments
Closed

Add shared preferences into the app. #13

justdvnsh opened this issue Oct 4, 2021 · 4 comments
Assignees
Labels
feature-request Label to put if requesting a new feature hacktoberfest Issues to solve if participating in hacktoberfest help wanted Extra attention is needed

Comments

@justdvnsh
Copy link
Owner

justdvnsh commented Oct 4, 2021

We need to add shared preferences into the app, so that we can retain the instances like the UI theme of the app.

NOTE: - The shared preferences should be made like a container which can be injected anywhere we want.

The shared preference class should be made in a module which can be injected by dagger anywhere in the app. I have added a reference . Also, the file should be in the DI package of the app module

@Module
@InstallIn(ActivityComponent::class.java)
class SharedPreference {
    // rest of the shared prefs implementation goes here.
}
@justdvnsh justdvnsh added help wanted Extra attention is needed hacktoberfest Issues to solve if participating in hacktoberfest feature-request Label to put if requesting a new feature labels Oct 4, 2021
@yash-k9
Copy link
Contributor

yash-k9 commented Oct 5, 2021

Hi @justdvnsh, I'd like to work on this. I have a question, are we going to store only UI Theme Data?

@justdvnsh
Copy link
Owner Author

@yash-k9 Hi, yes as for now we are only going to store the ui theme data, but later we'll be storing a few more things liks recent searches and stuff. Happy coding.

@yash-k9
Copy link
Contributor

yash-k9 commented Oct 10, 2021

Hi @justdvnsh, I've added Shared Preference and raised PR. Pls let me know if there are any other changes that need to be added in this issue.

@justdvnsh
Copy link
Owner Author

Solved by #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Label to put if requesting a new feature hacktoberfest Issues to solve if participating in hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants