[Rich text editor] Add feature flag for rich text editor (#1289)

This commit is contained in:
jonnyandrew 2023-09-13 09:17:02 +01:00 committed by GitHub
parent f136a308b2
commit d5b01ac0b4
16 changed files with 84 additions and 25 deletions

View file

@ -92,7 +92,7 @@ class FakeMatrixRoom(
private var sendPollResponseResult = Result.success(Unit)
private var endPollResult = Result.success(Unit)
private var progressCallbackValues = emptyList<Pair<Long, Long>>()
val editMessageCalls = mutableListOf<Pair<String, String>>()
val editMessageCalls = mutableListOf<Pair<String, String?>>()
var sendMediaCount = 0
private set
@ -171,7 +171,7 @@ class FakeMatrixRoom(
userAvatarUrlResult
}
override suspend fun sendMessage(body: String, htmlBody: String) = simulateLongTask {
override suspend fun sendMessage(body: String, htmlBody: String?) = simulateLongTask {
Result.success(Unit)
}
@ -200,15 +200,15 @@ class FakeMatrixRoom(
return cancelSendResult
}
override suspend fun editMessage(originalEventId: EventId?, transactionId: TransactionId?, body: String, htmlBody: String): Result<Unit> {
override suspend fun editMessage(originalEventId: EventId?, transactionId: TransactionId?, body: String, htmlBody: String?): Result<Unit> {
editMessageCalls += body to htmlBody
return Result.success(Unit)
}
var replyMessageParameter: Pair<String, String>? = null
var replyMessageParameter: Pair<String, String?>? = null
private set
override suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String): Result<Unit> {
override suspend fun replyMessage(eventId: EventId, body: String, htmlBody: String?): Result<Unit> {
replyMessageParameter = body to htmlBody
return Result.success(Unit)
}