Исправлено много варнингов
This commit is contained in:
@@ -51,6 +51,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
implementation(libs.androidx.hilt.navigation.compose)
|
||||
implementation(libs.androidx.hilt.lifecycle.viewmodel.compose)
|
||||
|
||||
// Hilt
|
||||
implementation(libs.dagger.hilt)
|
||||
|
||||
@@ -21,7 +21,7 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
@@ -66,7 +66,8 @@ fun WallencNavRoot(viewModel: WallencViewModel = hiltViewModel()) {
|
||||
TaskPipelineRoute::class.qualifiedName!! to NavBarItemData(
|
||||
R.string.task_pipeline_title,
|
||||
TaskPipelineRoute::class.qualifiedName!!,
|
||||
Icons.AutoMirrored.Rounded.List
|
||||
Icons.AutoMirrored.Rounded.List,
|
||||
R.string.task_pipeline_open,
|
||||
),
|
||||
SettingsRoute::class.qualifiedName!! to NavBarItemData(
|
||||
R.string.nav_label_settings,
|
||||
@@ -89,7 +90,7 @@ fun WallencNavRoot(viewModel: WallencViewModel = hiltViewModel()) {
|
||||
icon = {
|
||||
if (navBarItemData.icon != null) Icon(
|
||||
navBarItemData.icon,
|
||||
contentDescription = stringResource(navBarItemData.nameStringResourceId)
|
||||
contentDescription = stringResource(navBarItemData.iconContentDescriptionResourceId),
|
||||
)
|
||||
},
|
||||
label = { Text(stringResource(navBarItemData.nameStringResourceId)) },
|
||||
|
||||
@@ -2,4 +2,9 @@ package com.github.nullptroma.wallenc.ui.navigation
|
||||
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
|
||||
data class NavBarItemData(val nameStringResourceId: Int, val screenRouteClass: String, val icon: ImageVector?)
|
||||
data class NavBarItemData(
|
||||
val nameStringResourceId: Int,
|
||||
val screenRouteClass: String,
|
||||
val icon: ImageVector?,
|
||||
val iconContentDescriptionResourceId: Int = nameStringResourceId,
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
|
||||
@@ -42,7 +42,7 @@ import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.github.nullptroma.wallenc.ui.R
|
||||
import com.github.nullptroma.wallenc.vault.contract.CloudBrand
|
||||
@@ -174,7 +174,13 @@ fun RemoteVaultsScreen(
|
||||
style = MaterialTheme.typography.headlineSmall,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
)
|
||||
Spacer(modifier = Modifier.height(20.dp))
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.remote_vaults_add_pick_provider),
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
FilledTonalButton(
|
||||
onClick = {
|
||||
viewModel.setAddChoiceVisible(false)
|
||||
|
||||
@@ -30,7 +30,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.github.nullptroma.wallenc.domain.tasks.PipelineTask
|
||||
import com.github.nullptroma.wallenc.domain.tasks.TaskLogLevel
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.github.nullptroma.wallenc.ui.screens.main.screens.vault
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
|
||||
@Composable
|
||||
fun LocalVaultScreen(
|
||||
|
||||
Reference in New Issue
Block a user