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

Use the pure kotlin UUID for multiplatform compatibility #153

Open
bpappin opened this issue Dec 30, 2024 · 1 comment · May be fixed by #155
Open

Use the pure kotlin UUID for multiplatform compatibility #153

bpappin opened this issue Dec 30, 2024 · 1 comment · May be fixed by #155

Comments

@bpappin
Copy link

bpappin commented Dec 30, 2024

in file: com.halilibo.richtext.ui.util.UUID.kt
You have it set up as an expect/actual, which means that you need to implement it for each platform.

If you replace the platform specific code with the pure kotlin: Uuid.random().toString() when you dont need to implement it for all of them.

package com.halilibo.richtext.ui.util

import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

@OptIn(ExperimentalUuidApi::class)
internal fun randomUUID(): String = Uuid.random().toString()
@bpappin
Copy link
Author

bpappin commented Dec 30, 2024

FYI I am porting for my multiplatform project now, because its not behaving as is.

@Goooler Goooler linked a pull request Jan 22, 2025 that will close this issue
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 a pull request may close this issue.

1 participant