mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-08 16:18:53 +01:00
Use deviceId as session name when there is no display name
This commit is contained in:
parent
01429b352a
commit
1af712910f
@ -63,12 +63,13 @@ class OtherSessionsController @Inject constructor(
|
|||||||
}
|
}
|
||||||
val drawableColor = host.colorProvider.getColorFromAttribute(R.attr.vctr_content_secondary)
|
val drawableColor = host.colorProvider.getColorFromAttribute(R.attr.vctr_content_secondary)
|
||||||
val descriptionDrawable = if (device.isInactive) host.drawableProvider.getDrawable(R.drawable.ic_inactive_sessions, drawableColor) else null
|
val descriptionDrawable = if (device.isInactive) host.drawableProvider.getDrawable(R.drawable.ic_inactive_sessions, drawableColor) else null
|
||||||
|
val sessionName = device.deviceInfo.displayName ?: device.deviceInfo.deviceId
|
||||||
|
|
||||||
otherSessionItem {
|
otherSessionItem {
|
||||||
id(device.deviceInfo.deviceId)
|
id(device.deviceInfo.deviceId)
|
||||||
deviceType(device.deviceExtendedInfo.deviceType)
|
deviceType(device.deviceExtendedInfo.deviceType)
|
||||||
roomEncryptionTrustLevel(device.roomEncryptionTrustLevel)
|
roomEncryptionTrustLevel(device.roomEncryptionTrustLevel)
|
||||||
sessionName(device.deviceInfo.displayName)
|
sessionName(sessionName)
|
||||||
sessionDescription(description)
|
sessionDescription(description)
|
||||||
sessionDescriptionDrawable(descriptionDrawable)
|
sessionDescriptionDrawable(descriptionDrawable)
|
||||||
sessionDescriptionColor(descriptionColor)
|
sessionDescriptionColor(descriptionColor)
|
||||||
|
@ -62,9 +62,10 @@ class SessionInfoView @JvmOverloads constructor(
|
|||||||
stringProvider: StringProvider,
|
stringProvider: StringProvider,
|
||||||
) {
|
) {
|
||||||
renderDeviceInfo(
|
renderDeviceInfo(
|
||||||
sessionInfoViewState.deviceFullInfo.deviceInfo.displayName.orEmpty(),
|
sessionName = sessionInfoViewState.deviceFullInfo.deviceInfo.displayName
|
||||||
sessionInfoViewState.deviceFullInfo.deviceExtendedInfo.deviceType,
|
?: sessionInfoViewState.deviceFullInfo.deviceInfo.deviceId.orEmpty(),
|
||||||
stringProvider,
|
deviceType = sessionInfoViewState.deviceFullInfo.deviceExtendedInfo.deviceType,
|
||||||
|
stringProvider = stringProvider,
|
||||||
)
|
)
|
||||||
renderVerificationStatus(
|
renderVerificationStatus(
|
||||||
sessionInfoViewState.deviceFullInfo.roomEncryptionTrustLevel,
|
sessionInfoViewState.deviceFullInfo.roomEncryptionTrustLevel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user