-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Improvement data store #387
base: dev
Are you sure you want to change the base?
Conversation
Dev to Main
@07jasjeet can you please fix the tests here? |
@@ -31,6 +31,7 @@ android { | |||
dependencies { | |||
implementation 'androidx.appcompat:appcompat:1.6.1' | |||
implementation 'com.google.android.material:material:1.11.0' | |||
implementation "androidx.datastore:datastore-preferences:1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't have to add this dependency here if your library already uses it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oww it was a save for laptop repair, I guess pushing to origin is not very healthy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes will be amended please ignore last commit.
For every new preference, add default value of the concerned shared | ||
preference as default value here. | ||
*/ | ||
/* | ||
class MockAppPreferences( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's to come instead here, now?
import org.listenbrainz.android.util.BrainzPlayerExtensions.isPrepared | ||
import org.listenbrainz.android.util.BrainzPlayerExtensions.toSong | ||
import org.listenbrainz.android.util.BrainzPlayerUtils.MEDIA_ROOT_ID | ||
import org.listenbrainz.android.util.brainzplayer.BrainzPlayerExtensions.currentPlaybackPosition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally unrelated change to the PR
Completes objective of #347 (Same branch).
Changelog
Used TypesafeDatastore. This implementation results in flexibility, easier use and addition of preferences.