fix: resolve all build compilation and style check warnings (#597)

* fix: resolve all build compilation and style check warnings

* fix: remove unused import in SystemViewModel
This commit is contained in:
M57 authored and GitHub committed 2026-07-14 21:55:37 +03:00
1 parent 48f5ffbe52
commit d1fc477bcd
28 files changed
+293 -192

No files matched your search

@@ -76,30 +76,34 @@ fun ProcessesScreen(
modifier = modifier,
) {
when {
state.sessionId == null ->
state.sessionId == null -> {
EmptyState(
title = stringResource(R.string.processes_no_session_title),
subtitle = stringResource(R.string.processes_no_session_desc),
icon = Icons.Filled.Memory,
)
}
state.isLoading && state.processes.isEmpty() ->
state.isLoading && state.processes.isEmpty() -> {
LoadingState()
}
state.errorMessage != null ->
state.errorMessage != null -> {
ErrorState(
message = state.errorMessage ?: stringResource(R.string.error_unknown),
onRetry = { viewModel.load() },
)
}
state.processes.isEmpty() ->
state.processes.isEmpty() -> {
EmptyState(
title = stringResource(R.string.processes_empty_title),
subtitle = stringResource(R.string.processes_empty_desc),
icon = Icons.Filled.Memory,
)
}
else ->
else -> {
LazyColumn(
modifier = Modifier.fillMaxSize(),
contentPadding = listContentPadding,
@@ -113,6 +117,7 @@ fun ProcessesScreen(
)
}
}
}
}
}
@@ -238,8 +243,14 @@ private fun formatUptime(seconds: Int): String {
val m = seconds / 60
val s = seconds % 60
return when {
m <= 0 -> "${s}s"
m < 60 -> "${m}m ${s}s"
m <= 0 -> {
"${s}s"
}
m < 60 -> {
"${m}m ${s}s"
}
else -> {
val h = m / 60
"${h}h ${m % 60}m"