pills order

This commit is contained in:
Diogo
2024-08-30 22:22:21 +01:00
parent bfbe3cf062
commit 50b86f7dff

View File

@@ -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()
}
}
}
}