UI: rename `ModeSelection` to `ModelLoading` for better clarity

This commit is contained in:
Han Yin 2025-04-12 14:20:06 -07:00
parent 75c986afc5
commit 55681847e9
3 changed files with 9 additions and 10 deletions

View File

@ -3,7 +3,6 @@ package com.example.llama.revamp
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.OnBackPressedCallback
import androidx.activity.OnBackPressedDispatcher
import androidx.activity.compose.BackHandler
import androidx.activity.compose.LocalOnBackPressedDispatcherOwner
import androidx.activity.compose.setContent
@ -38,7 +37,7 @@ import com.example.llama.revamp.ui.screens.BenchmarkScreen
import com.example.llama.revamp.ui.screens.ConversationScreen
import com.example.llama.revamp.ui.screens.ModelSelectionScreen
import com.example.llama.revamp.ui.screens.ModelsManagementScreen
import com.example.llama.revamp.ui.screens.ModeSelectionScreen
import com.example.llama.revamp.ui.screens.ModelLoadingScreen
import com.example.llama.revamp.ui.screens.SettingsGeneralScreen
import com.example.llama.revamp.ui.theme.LlamaTheme
import com.example.llama.revamp.util.ViewModelFactoryProvider
@ -113,7 +112,7 @@ fun AppContent() {
derivedStateOf {
currentRoute == AppDestinations.CONVERSATION_ROUTE ||
currentRoute == AppDestinations.BENCHMARK_ROUTE ||
currentRoute == AppDestinations.MODE_SELECTION_ROUTE
currentRoute == AppDestinations.MODEL_LOADING_ROUTE
}
}
@ -192,7 +191,7 @@ fun AppContent() {
ModelSelectionScreen(
onModelSelected = { modelInfo ->
viewModel.selectModel(modelInfo)
navigationActions.navigateToModeSelection()
navigationActions.navigateToModelLoading()
},
onManageModelsClicked = {
navigationActions.navigateToModelsManagement()
@ -204,8 +203,8 @@ fun AppContent() {
}
// Mode Selection Screen
composable(AppDestinations.MODE_SELECTION_ROUTE) {
ModeSelectionScreen(
composable(AppDestinations.MODEL_LOADING_ROUTE) {
ModelLoadingScreen(
engineState = engineState,
onBenchmarkSelected = {
viewModel.prepareForBenchmark()

View File

@ -8,7 +8,7 @@ import androidx.navigation.NavController
object AppDestinations {
// Primary navigation destinations
const val MODEL_SELECTION_ROUTE = "model_selection"
const val MODE_SELECTION_ROUTE = "mode_selection"
const val MODEL_LOADING_ROUTE = "model_loading"
const val CONVERSATION_ROUTE = "conversation"
const val BENCHMARK_ROUTE = "benchmark"
@ -29,8 +29,8 @@ class NavigationActions(private val navController: NavController) {
}
}
fun navigateToModeSelection() {
navController.navigate(AppDestinations.MODE_SELECTION_ROUTE)
fun navigateToModelLoading() {
navController.navigate(AppDestinations.MODEL_LOADING_ROUTE)
}
fun navigateToConversation() {

View File

@ -63,7 +63,7 @@ enum class SystemPromptTab {
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
@Composable
fun ModeSelectionScreen(
fun ModelLoadingScreen(
engineState: InferenceEngine.State,
onBenchmarkSelected: () -> Unit,
onConversationSelected: (String?) -> Unit,