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

Improvement data store #387

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

07jasjeet
Copy link
Collaborator

@07jasjeet 07jasjeet commented Mar 13, 2024

Completes objective of #347 (Same branch).

Changelog

Used TypesafeDatastore. This implementation results in flexibility, easier use and addition of preferences.

@07jasjeet 07jasjeet changed the base branch from main to dev March 13, 2024 07:26
@akshaaatt
Copy link
Member

@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"
Copy link
Member

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

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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(
Copy link
Member

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
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

2 participants