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

Feat: [:core:data] - Migrated to KMP #2747

Open
wants to merge 3 commits into
base: kmp-impl
Choose a base branch
from

Conversation

Nagarjuna0033
Copy link
Contributor

@Nagarjuna0033 Nagarjuna0033 commented Jan 16, 2025

Fixes - Jira-#115

Didn't create a Jira ticket, click here to create new.

Please Add Screenshots If there are any UI changes.

Before After

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@Nagarjuna0033
Copy link
Contributor Author

@niyajali brother I have migrated the data module to KMP. This module depends on the database module for charge and notification dao. Once the database module is successfully migrated, I will pull those changes and integrate them. Meanwhile, let me know if there are any changes that need to be made to these files.

clientId = clientId,
),
)
_userInfo.value = UserData.DEFAULT.copy(
Copy link
Collaborator

Choose a reason for hiding this comment

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

    it could be like this, use _userInfo.copy instead of Default value
    withContext(dispatcher) {
        val updatedClient = _clientInfo.value.copy(
            firstname = client.firstname,
            lastname = client.lastname,
            displayName = client.firstname + " " + client.lastname,
            emailAddress = client.emailAddress,
            mobileNo = client.mobileNo,
            externalId = client.externalId,
        )

        settings.putClientPreference(updatedClient)
        _clientInfo.value = updatedClient
    }       

Copy link
Collaborator

Choose a reason for hiding this comment

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

also above updateToken fun need to be change

return dataManager.clientsApi.clients()
.asDataStateFlow().flowOn(ioDispatcher)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove below function we can use directly from UserPreferencesRepository

@niyajali
Copy link
Collaborator

@Nagarjuna0033 We can't wait for the database module to merge because that gonna take time since Room isn't fully supported KMP, we've use SQLDelight so for now, provide an empty or default value into those specific RepositoryImpl functions, later on we'll provide actual implementation.

@Nagarjuna0033 Nagarjuna0033 force-pushed the migrating-data-module-to-kmp branch from 28d0652 to 2b17f80 Compare January 17, 2025 16:19
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