Room/Timeline: simplify the apis
This commit is contained in:
parent
9afadaf406
commit
cb219e6292
13 changed files with 134 additions and 150 deletions
|
|
@ -61,6 +61,8 @@ interface MatrixRoom : Closeable {
|
|||
|
||||
fun timeline(): MatrixTimeline
|
||||
|
||||
fun open(): Result<Unit>
|
||||
|
||||
suspend fun userDisplayName(userId: UserId): Result<String?>
|
||||
|
||||
suspend fun userAvatarUrl(userId: UserId): Result<String?>
|
||||
|
|
|
|||
|
|
@ -28,20 +28,8 @@ interface MatrixTimeline {
|
|||
)
|
||||
|
||||
fun paginationState(): StateFlow<PaginationState>
|
||||
|
||||
fun timelineItems(): Flow<List<MatrixTimelineItem>>
|
||||
|
||||
suspend fun paginateBackwards(requestSize: Int, untilNumberOfItems: Int): Result<Unit>
|
||||
fun initialize()
|
||||
fun dispose()
|
||||
|
||||
/**
|
||||
* @param message markdown message
|
||||
*/
|
||||
suspend fun sendMessage(message: String): Result<Unit>
|
||||
|
||||
suspend fun editMessage(originalEventId: EventId, message: String): Result<Unit>
|
||||
|
||||
suspend fun replyMessage(inReplyToEventId: EventId, message: String): Result<Unit>
|
||||
|
||||
suspend fun fetchDetailsForEvent(eventId: EventId): Result<Unit>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue