refactor: clean up unused resources and update color references (#2559)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-07-29 10:31:59 -05:00 committed by GitHub
parent ff9e0bdde4
commit 9418dceeef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 4 additions and 202 deletions

View file

@ -25,6 +25,7 @@ import androidx.compose.ui.graphics.Color
val MeshtasticGreen = Color(0xFF67EA94)
val MeshtasticAlt = Color(0xFF2C2D3C)
val HyperlinkBlue = Color(0xFF43C3B0)
val AnnotationColor = Color(0xFF039BE5)
object IAQColors {
val IAQExcellent = Color(0xFF00E400)

View file

@ -61,7 +61,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
@ -82,6 +81,7 @@ import com.geeksville.mesh.model.DebugViewModel
import com.geeksville.mesh.model.DebugViewModel.UiMeshLog
import com.geeksville.mesh.ui.common.components.CopyIconButton
import com.geeksville.mesh.ui.common.components.SimpleAlertDialog
import com.geeksville.mesh.ui.common.theme.AnnotationColor
import com.geeksville.mesh.ui.common.theme.AppTheme
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.Dispatchers
@ -290,7 +290,7 @@ private fun rememberAnnotatedString(text: String, searchText: String): Annotated
@Composable
private fun rememberAnnotatedLogMessage(log: UiMeshLog, searchText: String): AnnotatedString {
val theme = MaterialTheme.colorScheme
val style = SpanStyle(color = colorResource(id = R.color.colorAnnotation), fontStyle = FontStyle.Italic)
val style = SpanStyle(color = AnnotationColor, fontStyle = FontStyle.Italic)
val highlightStyle = SpanStyle(background = theme.primary.copy(alpha = 0.3f), color = theme.onSurface)
return remember(log.uuid, searchText) {