Package 

Class MessageTextKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageText(Message message, User currentUser, Modifier modifier, Function1<Message, Unit> onLongItemClick, Function2<Message, String, Unit> onLinkClick, Function1<Mention, Unit> onMentionClick, Function1<User, Unit> onUserMentionClick) Default text element for messages, with extra styling and padding for the chat bubble.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • MessageText

        @Composable() final static Unit MessageText(Message message, User currentUser, Modifier modifier, Function1<Message, Unit> onLongItemClick, Function2<Message, String, Unit> onLinkClick, Function1<Mention, Unit> onMentionClick, Function1<User, Unit> onUserMentionClick)

        Default text element for messages, with extra styling and padding for the chat bubble.

        It detects if we have any annotations/links in the message, and if so, it uses the ClickableText component to allow for clicks on said links, that will open the link.

        Alternatively, it just shows a basic Text element.

        Parameters:
        message - Message to show.
        currentUser - The currently logged in user.
        modifier - Modifier for styling.
        onLongItemClick - Handler used for long pressing on the message text.
        onLinkClick - Handler used for clicking on a link in the message.