Refactor: Extract hardcoded "todo" to constant in KanbanScreen (#190)

- Extracted the hardcoded string "todo" to a `DEFAULT_COLUMN` constant in `KanbanScreen.kt` to improve code health and readability.
- Replaced the hardcoded string literal in the `viewModel.createTask` call with the new constant.
This commit is contained in:
M57 authored and GitHub committed 2026-06-21 00:17:37 +03:00
1 parent 63a927fae2
commit 0eed12d18e
1 file changed
+3 -1
@@ -48,6 +48,8 @@ import com.m57.hermescontrol.ui.common.ErrorState
import com.m57.hermescontrol.ui.common.HermesScaffold
import com.m57.hermescontrol.ui.common.LoadingState
private const val DEFAULT_COLUMN = "todo"
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun KanbanScreen(
@@ -185,7 +187,7 @@ fun KanbanScreen(
AddTaskDialog(
onDismiss = { showAddTaskDialog = false },
onConfirm = { title, desc ->
viewModel.createTask(title, desc, state.columns.firstOrNull()?.name ?: "todo")
viewModel.createTask(title, desc, state.columns.firstOrNull()?.name ?: DEFAULT_COLUMN)
showAddTaskDialog = false
},
)