Refactor userEventPermissions
This commit is contained in:
parent
2605ddec7a
commit
6ad547833f
7 changed files with 41 additions and 24 deletions
|
|
@ -56,6 +56,13 @@ fun MatrixRoom.canCall(updateKey: Long): State<Boolean> {
|
|||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MatrixRoom.canPinUnpin(updateKey: Long): State<Boolean> {
|
||||
return produceState(initialValue = false, key1 = updateKey) {
|
||||
value = canUserPinUnpin(sessionId).getOrElse { false }
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MatrixRoom.isOwnUserAdmin(): Boolean {
|
||||
val roomInfo by roomInfoFlow.collectAsState(initial = null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue