mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 04:15:12 +00:00
Room join : add presenter tests
This commit is contained in:
+9
-1
@@ -28,10 +28,18 @@ data class RoomDescription(
|
||||
val name: String,
|
||||
val description: String,
|
||||
val avatarUrl: String?,
|
||||
val canBeJoined: Boolean,
|
||||
val joinRule: JoinRule,
|
||||
val numberOfMembers: Long,
|
||||
) : Parcelable {
|
||||
|
||||
enum class JoinRule {
|
||||
PUBLIC,
|
||||
KNOCK,
|
||||
UNKNOWN
|
||||
}
|
||||
|
||||
fun canBeJoined() = joinRule == JoinRule.PUBLIC || joinRule == JoinRule.KNOCK
|
||||
|
||||
fun avatarData(size: AvatarSize) = AvatarData(
|
||||
id = roomId.value,
|
||||
name = name,
|
||||
|
||||
Reference in New Issue
Block a user