mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 20:01:55 +00:00
Room navigation : make it working with RoomDirectory
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
plugins {
|
||||
id("io.element.android-library")
|
||||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
+15
-2
@@ -16,13 +16,26 @@
|
||||
|
||||
package io.element.android.features.roomdirectory.api
|
||||
|
||||
import android.os.Parcelable
|
||||
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class RoomDescription(
|
||||
val roomId: RoomId,
|
||||
val name: String,
|
||||
val description: String,
|
||||
val avatarData: AvatarData,
|
||||
val avatarUrl: String?,
|
||||
val canBeJoined: Boolean,
|
||||
)
|
||||
val numberOfMembers: Long,
|
||||
) : Parcelable {
|
||||
|
||||
fun avatarData(size: AvatarSize) = AvatarData(
|
||||
id = roomId.value,
|
||||
name = name,
|
||||
url = avatarUrl,
|
||||
size = size,
|
||||
)
|
||||
}
|
||||
|
||||
+2
-1
@@ -31,6 +31,7 @@ interface RoomDirectoryEntryPoint : FeatureEntryPoint {
|
||||
}
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onOpenRoom(roomId: RoomId)
|
||||
fun onRoomJoined(roomId: RoomId)
|
||||
fun onResultClicked(roomDescription: RoomDescription)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user