fix(node): list and detail usability fixes (#4336)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-01-27 12:33:46 -06:00 committed by GitHub
parent 3f45687351
commit dff3e60b8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 284 additions and 306 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Meshtastic LLC
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -14,10 +14,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.core.ui.component
import android.content.ClipData
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
@ -137,8 +137,10 @@ fun BasicListItem(
) {
ListItem(
modifier =
if (onLongClick != null || onClick != null) {
modifier.combinedClickable(onLongClick = onLongClick, onClick = onClick ?: {})
if (onLongClick != null) {
modifier.combinedClickable(enabled = enabled, onLongClick = onLongClick, onClick = onClick ?: {})
} else if (onClick != null) {
modifier.clickable(enabled = enabled, onClick = onClick)
} else {
modifier
},

View file

@ -30,6 +30,7 @@ import androidx.compose.material.icons.rounded.Delete
import androidx.compose.material.icons.rounded.Edit
import androidx.compose.material.icons.rounded.Folder
import androidx.compose.material.icons.rounded.MoreVert
import androidx.compose.material.icons.rounded.QrCode2
import androidx.compose.material.icons.rounded.Refresh
import androidx.compose.material.icons.rounded.Save
import androidx.compose.material.icons.rounded.Search
@ -79,3 +80,6 @@ val MeshtasticIcons.SelectAll: ImageVector
get() = Icons.Rounded.SelectAll
val MeshtasticIcons.ThumbUp: ImageVector
get() = Icons.Rounded.ThumbUp
val MeshtasticIcons.QrCode2: ImageVector
get() = Icons.Rounded.QrCode2