Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Update flow to shared flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyandrew committed Sep 26, 2023
1 parent 2e8f78d commit a4b490a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import io.element.android.wysiwyg.view.models.InlineFormat
import io.element.android.wysiwyg.view.models.LinkAction
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.launch
import uniffi.wysiwyg_composer.ActionState
import uniffi.wysiwyg_composer.ComposerAction
Expand All @@ -42,7 +44,7 @@ class RichTextEditorState(
internal var activeViewKey: Any? by mutableStateOf(-1)

private val _viewActions = MutableSharedFlow<ViewAction>()
internal val viewActions: Flow<ViewAction> = _viewActions
internal val viewActions: SharedFlow<ViewAction> = _viewActions.asSharedFlow()

/**
* Toggle inline formatting on the current selection.
Expand Down

0 comments on commit a4b490a

Please sign in to comment.