Class ReferenceManager

    • Constructor Detail

      • ReferenceManager

        ReferenceManager()
    • Method Detail

      • onInit

         void onInit(Context context, String appKey)
      • getPluginModules

         List<IPluginModule> getPluginModules(ChannelType channelType)
      • onTextChanged

         void onTextChanged(Context context, ChannelType type, String targetId, int cursorPos, int count, String text)
      • applyReference

         MessageContent applyReference(TextMessage textMessage)

        Merges the pending TextMessage with the current reference.

        If a reference message exists (reference bar shown above the input), fills the text and MentionedInfo from textMessage into ReferenceMessage, hides the reference bar, and returns the ReferenceMessage; otherwise returns textMessage as-is.

        Parameters:
        textMessage - the plain text message constructed from the input field
        Returns:

        a ReferenceMessage with the reference, or the original textMessage if none

      • onDestroy

         void onDestroy(ChannelType type, String targetId)
      • showReferenceView

         boolean showReferenceView(Context context, UiMessage uiMessage)

        Shows the reference message bar.

        Parameters:
        context - the context
        uiMessage - the message entity
        Returns:

        whether the display was successful

      • showReferenceView

         boolean showReferenceView(Context context, UiMessage uiMessage, boolean showKeyBoard)

        Shows the reference message bar.

        Parameters:
        context - the context
        uiMessage - the message entity
        Returns:

        whether the display was successful

      • onDeleteClick

         void onDeleteClick(ChannelType type, String targetId, EditText editText, int cursorPos)