nit: extract app name into a constant value; remove unused onBackPressed callbacks
This commit is contained in:
parent
9f1d26ac95
commit
0d65c4b06b
|
|
@ -3,5 +3,7 @@ package com.example.llama.revamp
|
|||
import android.app.Application
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
||||
const val APP_NAME = "Kleidi LLama"
|
||||
|
||||
@HiltAndroidApp
|
||||
class KleidiLlamaApplication : Application()
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
|
|||
import androidx.compose.ui.platform.LocalConfiguration
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.llama.revamp.APP_NAME
|
||||
import com.example.llama.revamp.navigation.NavigationActions
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
|
@ -103,7 +104,7 @@ private fun DrawerContent(
|
|||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text(
|
||||
text = "Kleidi LLaMA",
|
||||
text = APP_NAME,
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ private fun ConversationInputField(
|
|||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.padding(end = 8.dp),
|
||||
placeholder = { Text("Message Kleidi LLaMA...") },
|
||||
placeholder = { Text("Message $APP_NAME...") },
|
||||
maxLines = 5,
|
||||
enabled = isEnabled,
|
||||
colors = TextFieldDefaults.colors(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ import com.example.llama.revamp.viewmodel.ModelsManagementViewModel
|
|||
*/
|
||||
@Composable
|
||||
fun ModelsManagementScreen(
|
||||
onBackPressed: () -> Unit,
|
||||
onScaffoldEvent: (ScaffoldEvent) -> Unit,
|
||||
viewModel: ModelsManagementViewModel,
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import com.example.llama.revamp.APP_NAME
|
||||
import com.example.llama.revamp.viewmodel.PerformanceViewModel
|
||||
|
||||
/**
|
||||
|
|
@ -29,7 +30,6 @@ import com.example.llama.revamp.viewmodel.PerformanceViewModel
|
|||
@Composable
|
||||
fun SettingsGeneralScreen(
|
||||
performanceViewModel: PerformanceViewModel = hiltViewModel(),
|
||||
onBackPressed: () -> Unit,
|
||||
) {
|
||||
// Collect state from ViewModel
|
||||
val isMonitoringEnabled by performanceViewModel.isMonitoringEnabled.collectAsState()
|
||||
|
|
@ -76,7 +76,7 @@ fun SettingsGeneralScreen(
|
|||
modifier = Modifier.padding(16.dp)
|
||||
) {
|
||||
Text(
|
||||
text = "Kleidi LLaMA",
|
||||
text = APP_NAME,
|
||||
style = MaterialTheme.typography.titleLarge
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue