Skip to content

MarkdownDocument doesn't update when changing parameters #108

@EdricChan03

Description

@EdricChan03

Tracking issue from #105

var overrideLinkInteractionListener by rememberSaveable { mutableStateOf(true) }
val linkInteractionListener = remember(overrideLinkInteractionListener) {
    if (overrideLinkInteractionListener) LinkInteractionListener {
        Toast.makeText(
            this@MainActivity,
            "Clicked annotation: $it",
            Toast.LENGTH_SHORT
        ).show()
    } else null
}
MarkdownDocument(
    linkInteractionListener = linkInteractionListener // Text doesn't update when this is dynamically updated
)

Think adding more keys to the remember {} call when building the inline text content should suffice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions