Fix some warnings
This commit is contained in:
committed by
Benoit Marty
parent
d6058716c6
commit
9a391d330c
@@ -476,7 +476,6 @@ fun MessageEventRow(
|
||||
content = messageEvent.content,
|
||||
modifier = contentModifier
|
||||
)
|
||||
else -> TODO() /* compiler issue ? */
|
||||
}
|
||||
}
|
||||
MessagesReactionsView(
|
||||
|
||||
@@ -10,7 +10,7 @@ import io.element.android.x.core.BuildConfig
|
||||
// copied at the call site to ensure that its logging only recompositions from the
|
||||
// original call site.
|
||||
@Composable
|
||||
inline fun LogCompositions(tag: String, msg: String) {
|
||||
fun LogCompositions(tag: String, msg: String) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
val ref = remember { Ref(0) }
|
||||
SideEffect { ref.value++ }
|
||||
|
||||
@@ -150,6 +150,7 @@ class MatrixClient internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
suspend fun loadMediaContentForSource(source: MediaSource): Result<ByteArray> =
|
||||
withContext(dispatchers.io) {
|
||||
runCatching {
|
||||
@@ -157,6 +158,7 @@ class MatrixClient internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
suspend fun loadMediaThumbnailForSource(
|
||||
source: MediaSource,
|
||||
width: Long,
|
||||
|
||||
@@ -88,7 +88,7 @@ class MatrixRoom(
|
||||
|
||||
suspend fun editMessage(originalEventId: String, message: String): Result<Unit> = withContext(coroutineDispatchers.io) {
|
||||
val transactionId = genTransactionId()
|
||||
val content = messageEventContentFromMarkdown(message)
|
||||
// val content = messageEventContentFromMarkdown(message)
|
||||
runCatching {
|
||||
room.edit(/* TODO use content */ message, originalEventId, transactionId)
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class MatrixRoom(
|
||||
|
||||
suspend fun replyMessage(eventId: String, message: String): Result<Unit> = withContext(coroutineDispatchers.io) {
|
||||
val transactionId = genTransactionId()
|
||||
val content = messageEventContentFromMarkdown(message)
|
||||
// val content = messageEventContentFromMarkdown(message)
|
||||
runCatching {
|
||||
room.sendReply(/* TODO use content */ message, eventId, transactionId)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.element.android.x.core.coroutine.CoroutineDispatchers
|
||||
import io.element.android.x.matrix.sync.roomListDiff
|
||||
import io.element.android.x.matrix.sync.state
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.cancelChildren
|
||||
@@ -81,6 +82,7 @@ internal class RustRoomSummaryDataSource(
|
||||
coroutineScope.cancel()
|
||||
}
|
||||
|
||||
@OptIn(FlowPreview::class)
|
||||
override fun roomSummaries(): Flow<List<RoomSummary>> {
|
||||
return roomSummaries.sample(50)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.element.android.x.matrix.timeline
|
||||
import io.element.android.x.core.coroutine.CoroutineDispatchers
|
||||
import io.element.android.x.matrix.room.MatrixRoom
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.FlowPreview
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.sample
|
||||
@@ -36,6 +37,7 @@ class MatrixTimeline(
|
||||
private val timelineItems: MutableStateFlow<List<MatrixTimelineItem>> =
|
||||
MutableStateFlow(emptyList())
|
||||
|
||||
@OptIn(FlowPreview::class)
|
||||
fun timelineItems(): Flow<List<MatrixTimelineItem>> {
|
||||
return timelineItems.sample(50)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user