jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
586 stars 50 forks source link

Hyperlink can be truncated after scrolling #119

Open hugolden opened 2 months ago

hugolden commented 2 months ago

Put the markdown viewers in a lazycloumn. After scrolling down and back, those highlighted hyperlinks can be truncated.

I pasted a screen recording for the issue.

https://github.com/user-attachments/assets/fdc0e818-8cea-4722-a3ce-40c6998f38ec

jeziellago commented 2 months ago

Hi @hugolden! Thanks for reporting it. just to confirm, are you using the latest version of the library?

hugolden commented 2 months ago

Hi @hugolden! Thanks for reporting it. just to confirm, are you using the latest version of the library?

Hi @jeziellago

Thanks for your reply!

I believe it is the latest release. I am using 0.5.4 for testing.

Regards

jeziellago commented 2 months ago

what is your screen structure? is it something like this?


LazyColumn(...) {
    item {
        MarkdownText(...)
    }
}
jeziellago commented 2 months ago

I could not reproduce this issue. Please, if you have some code snippets to share, would help to understand better what is happening.

hugolden commented 2 months ago

I could not reproduce this issue. Please, if you have some code snippets to share, would help to understand better what is happening.

Well... Things are quite complex in my code.

Basically, it is something like what you have pasted. But there is indeed some code that will cause recomposition in the middle. I cannot really paste code snippets here since the markdown compositions are integrated as part of my dependent library.

One thing I noticed that lower the frequency of the recomposition can help reduce the occurrence.