MessageOriginalTranslationsStore

A store for managing the visibility of original translations of messages.

This store keeps track of which messages have their original text translations shown or hidden. It provides methods to toggle, show, hide, and check the visibility of original text translations.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun clear()

Clears all stored original text message IDs, effectively hiding all original texts.

Link copied to clipboard
fun hideOriginalText(messageId: String)

Hides the original text and shows the auto-translated text for a given message ID.

Link copied to clipboard

Checks if the original text translation for a given message ID should be shown.

Link copied to clipboard
fun showOriginalText(messageId: String)

Shows the original text for a given translated message ID.

Link copied to clipboard
fun toggleOriginalText(messageId: String)

Toggles the visibility of the original text translation for a given message ID. If the original text is currently shown, it will be hidden, and vice versa.