Use .value instead of .toString().
This commit is contained in:
parent
1fe2eceb9a
commit
d06c9de08c
5 changed files with 6 additions and 6 deletions
|
|
@ -242,7 +242,7 @@ private fun RoomMemberActionsBottomSheet(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = user.userId.toString(),
|
text = user.userId.value,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
color = ElementTheme.colors.textSecondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ class DefaultBaseRoomLastMessageFormatterTest {
|
||||||
val info = ImageInfo(null, null, null, null, null, null, null)
|
val info = ImageInfo(null, null, null, null, null, null, null)
|
||||||
val message = createRoomEvent(false, null, aStickerContent(body, info, aMediaSource(url = "url")))
|
val message = createRoomEvent(false, null, aStickerContent(body, info, aMediaSource(url = "url")))
|
||||||
val result = formatter.format(message, false)
|
val result = formatter.format(message, false)
|
||||||
val expectedBody = someoneElseId.toString() + ": Sticker (a sticker body)"
|
val expectedBody = someoneElseId.value + ": Sticker (a sticker body)"
|
||||||
assertThat(result.toString()).isEqualTo(expectedBody)
|
assertThat(result.toString()).isEqualTo(expectedBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ object MatrixPatterns {
|
||||||
val urlMatch = match.groupValues[1]
|
val urlMatch = match.groupValues[1]
|
||||||
when (val permalink = permalinkParser.parse(urlMatch)) {
|
when (val permalink = permalinkParser.parse(urlMatch)) {
|
||||||
is PermalinkData.UserLink -> {
|
is PermalinkData.UserLink -> {
|
||||||
add(MatrixPatternResult(MatrixPatternType.USER_ID, permalink.userId.toString(), match.range.first, match.range.last + 1))
|
add(MatrixPatternResult(MatrixPatternType.USER_ID, permalink.userId.value, match.range.first, match.range.last + 1))
|
||||||
}
|
}
|
||||||
is PermalinkData.RoomLink -> {
|
is PermalinkData.RoomLink -> {
|
||||||
when (permalink.roomIdOrAlias) {
|
when (permalink.roomIdOrAlias) {
|
||||||
|
|
|
||||||
|
|
@ -305,13 +305,13 @@ class RustBaseRoom(
|
||||||
|
|
||||||
override suspend fun declineCall(notificationEventId: EventId): Result<Unit> = withContext(roomDispatcher) {
|
override suspend fun declineCall(notificationEventId: EventId): Result<Unit> = withContext(roomDispatcher) {
|
||||||
runCatchingExceptions {
|
runCatchingExceptions {
|
||||||
innerRoom.declineCall(notificationEventId.toString())
|
innerRoom.declineCall(notificationEventId.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun subscribeToCallDecline(notificationEventId: EventId): Flow<UserId> = withContext(roomDispatcher) {
|
override suspend fun subscribeToCallDecline(notificationEventId: EventId): Flow<UserId> = withContext(roomDispatcher) {
|
||||||
mxCallbackFlow {
|
mxCallbackFlow {
|
||||||
innerRoom.subscribeToCallDeclineEvents(notificationEventId.toString(), object : CallDeclineListener {
|
innerRoom.subscribeToCallDeclineEvents(notificationEventId.value, object : CallDeclineListener {
|
||||||
override fun call(declinerUserId: String) {
|
override fun call(declinerUserId: String) {
|
||||||
trySend(UserId(declinerUserId))
|
trySend(UserId(declinerUserId))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ fun RustAllowRule.map(): AllowRule {
|
||||||
|
|
||||||
fun AllowRule.map(): RustAllowRule {
|
fun AllowRule.map(): RustAllowRule {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is AllowRule.RoomMembership -> RustAllowRule.RoomMembership(roomId.toString())
|
is AllowRule.RoomMembership -> RustAllowRule.RoomMembership(roomId.value)
|
||||||
is AllowRule.Custom -> RustAllowRule.Custom(json)
|
is AllowRule.Custom -> RustAllowRule.Custom(json)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue