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