mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Use .value instead of .toString().
This commit is contained in:
+1
-1
@@ -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,
|
||||||
|
|||||||
+1
-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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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) {
|
||||||
|
|||||||
+2
-2
@@ -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))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user