Transform MessageEventType and StateEventType into sealed interfaces to handle the Custom variant, also add missing variants
This commit is contained in:
parent
0ed40c562d
commit
a8ffe46d99
16 changed files with 230 additions and 164 deletions
|
|
@ -387,10 +387,10 @@ class SecurityAndPrivacyPresenterTest {
|
|||
return FakeRoomPermissions(
|
||||
canSendState = { eventType ->
|
||||
when (eventType) {
|
||||
StateEventType.ROOM_JOIN_RULES -> canChangeRoomAccess
|
||||
StateEventType.ROOM_HISTORY_VISIBILITY -> canChangeHistoryVisibility
|
||||
StateEventType.ROOM_ENCRYPTION -> canChangeEncryption
|
||||
StateEventType.ROOM_CANONICAL_ALIAS -> canChangeRoomVisibility
|
||||
StateEventType.RoomJoinRules -> canChangeRoomAccess
|
||||
StateEventType.RoomHistoryVisibility -> canChangeHistoryVisibility
|
||||
StateEventType.RoomEncryption -> canChangeEncryption
|
||||
StateEventType.RoomCanonicalAlias -> canChangeRoomVisibility
|
||||
else -> lambdaError()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue