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

Feature/link profile to auth/main #346

Merged
merged 13 commits into from
May 19, 2024
Merged

Conversation

yzueger
Copy link
Collaborator

@yzueger yzueger commented May 19, 2024

Closes #262
Feature branch merge

Copy link
Collaborator

@KlaKalma KlaKalma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I said can you change addTrackToBeacon in the beacon connection file so that the actual profile is used ?

@@ -26,14 +26,11 @@ class ProfileConnection(
override val db = database
private val coroutineScope = CoroutineScope(Dispatchers.IO + SupervisorJob())

override fun isUidExisting(spotifyUid: String, callback: (Boolean, Profile?) -> Unit) {
override fun isUidExisting(firebaseUid: String, callback: (Boolean, Profile?) -> Unit) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we said that both are the same we should probably do a refactoring of it soon where we have only one uid no ? And delete the spotify UID. Of course not for this PR

viewModelScope.launch {
repository.getItem(id).collect { fetchedProfile ->
suspend fun getProfileByID(id: String, create: Boolean) {
repository.isUidExisting(id) { exists, fetchedProfile ->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably should use getItem instead of isUidExisting

Copy link

@KlaKalma KlaKalma marked this pull request as ready for review May 19, 2024 20:02
Copy link
Collaborator

@KlaKalma KlaKalma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yzueger yzueger merged commit f5a834c into main May 19, 2024
2 checks passed
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.

Connect the auth to firebase, and retrieve the profile
2 participants