Restore intentional mentions in the markdown/plain text editor (#3193)
* Restore intentional mentions in the markdown/plain text editor --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
5493d6b741
commit
2ff5fa67fc
31 changed files with 717 additions and 288 deletions
|
|
@ -16,13 +16,19 @@
|
|||
|
||||
package io.element.android.libraries.matrix.test.permalink
|
||||
|
||||
import io.element.android.libraries.matrix.api.core.RoomAlias
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.permalink.PermalinkBuilder
|
||||
|
||||
class FakePermalinkBuilder(
|
||||
private val result: (UserId) -> Result<String> = { Result.failure(Exception("Not implemented")) }
|
||||
private val permalinkForUserLambda: (UserId) -> Result<String> = { Result.failure(Exception("Not implemented")) },
|
||||
private val permalinkForRoomAliasLambda: (RoomAlias) -> Result<String> = { Result.failure(Exception("Not implemented")) },
|
||||
) : PermalinkBuilder {
|
||||
override fun permalinkForUser(userId: UserId): Result<String> {
|
||||
return result(userId)
|
||||
return permalinkForUserLambda(userId)
|
||||
}
|
||||
|
||||
override fun permalinkForRoomAlias(roomAlias: RoomAlias): Result<String> {
|
||||
return permalinkForRoomAliasLambda(roomAlias)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue