CanSendEvent default to true and branch refresh mechanism...
This commit is contained in:
+3
-3
@@ -23,9 +23,9 @@ import io.element.android.libraries.matrix.api.room.MatrixRoom
|
||||
import io.element.android.libraries.matrix.api.room.MessageEventType
|
||||
|
||||
@Composable
|
||||
fun MatrixRoom.canSendEventAsState(type: MessageEventType): State<Boolean> {
|
||||
return produceState(initialValue = false, key1 = type) {
|
||||
value = canSendEvent(type).getOrElse { false }
|
||||
fun MatrixRoom.canSendEventAsState(type: MessageEventType, updateKey: Long): State<Boolean> {
|
||||
return produceState(initialValue = true, key1 = updateKey) {
|
||||
value = canSendEvent(type).getOrElse { true }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user