Merge branch 'develop' into dla/feature/room_list_decoration

This commit is contained in:
David Langley 2023-09-18 10:34:32 +01:00 committed by GitHub
commit bc29a31986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 2169 additions and 336 deletions

View file

@ -276,6 +276,23 @@ class RustMatrixClient constructor(
}
}
override suspend fun setDisplayName(displayName: String): Result<Unit> =
withContext(sessionDispatcher) {
runCatching { client.setDisplayName(displayName) }
}
@OptIn(ExperimentalUnsignedTypes::class)
override suspend fun uploadAvatar(mimeType: String, data: ByteArray): Result<Unit> =
withContext(sessionDispatcher) {
runCatching { client.uploadAvatar(mimeType, data.toUByteArray().toList()) }
}
override suspend fun removeAvatar(): Result<Unit> =
withContext(sessionDispatcher) {
runCatching { client.removeAvatar() }
}
override fun syncService(): SyncService = rustSyncService
override fun sessionVerificationService(): SessionVerificationService = verificationService

View file

@ -111,6 +111,9 @@ class RoomSummaryListProcessor(
RoomListEntriesUpdate.Clear -> {
clear()
}
is RoomListEntriesUpdate.Truncate -> {
subList(update.length.toInt(), size).clear()
}
}
}
@ -119,7 +122,7 @@ class RoomSummaryListProcessor(
RoomListEntry.Empty -> buildEmptyRoomSummary()
is RoomListEntry.Filled -> buildAndCacheRoomSummaryForIdentifier(entry.roomId)
is RoomListEntry.Invalidated -> {
roomSummariesByIdentifier[entry.roomId] ?: buildEmptyRoomSummary()
roomSummariesByIdentifier[entry.roomId] ?: buildAndCacheRoomSummaryForIdentifier(entry.roomId)
}
}
}

View file

@ -98,6 +98,9 @@ internal class MatrixTimelineDiffProcessor(
TimelineChange.CLEAR -> {
clear()
}
TimelineChange.TRUNCATE -> {
// Not supported
}
}
}

View file

@ -49,7 +49,7 @@ internal class RustTracingTree(private val retrieveFromStackTrace: Boolean) : Ti
line = location.line,
level = logLevel,
target = Target.ELEMENT.filter,
message = message,
message = if (tag != null) "[$tag] $message" else message,
)
}