From 50b86f7dffc5bdcbb0cf03f18fb433e4fc693b26 Mon Sep 17 00:00:00 2001 From: Diogo Date: Fri, 30 Aug 2024 22:22:21 +0100 Subject: [PATCH] pills order --- .../common/views/chatlist/UserPicker.kt | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.kt index 7f48649ef0..24f506b284 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.kt @@ -605,13 +605,16 @@ private fun DevicePickerRow( horizontalArrangement = Arrangement.spacedBy(12.dp), verticalAlignment = Alignment.CenterVertically ) { - DevicePill( - active = localDeviceActive, - icon = painterResource(MR.images.ic_desktop), - text = stringResource(MR.strings.this_device), - actionButtonVisible = false - ) { - onLocalDeviceClick() + + if (localDeviceActive) { + DevicePill( + active = true, + icon = painterResource(MR.images.ic_desktop), + text = stringResource(MR.strings.this_device), + actionButtonVisible = false + ) { + onLocalDeviceClick() + } } remoteHosts.filter { h -> h.activeHost }.forEach { h -> val connecting = rememberSaveable { mutableStateOf(false) } @@ -626,6 +629,17 @@ private fun DevicePickerRow( onRemoteHostClick(h, connecting) } } + + if (!localDeviceActive) { + DevicePill( + active = false, + icon = painterResource(MR.images.ic_desktop), + text = stringResource(MR.strings.this_device), + actionButtonVisible = false + ) { + onLocalDeviceClick() + } + } } }