mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 07:11:51 +03:00
Fix initial detekt issues (#10)
This commit is contained in:
parent
dc2ed4403a
commit
ee199b9e9f
3 changed files with 6 additions and 4 deletions
|
@ -14,7 +14,7 @@ import androidx.compose.ui.graphics.Color
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun PlaceholderComposable(
|
fun PlaceholderComposable(
|
||||||
text: String = "Placeholder Composable"
|
text: String = "Placeholder Composable",
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.x8bit.bitwarden.ui.components.PlaceholderComposable
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun RootNavScreen(
|
fun RootNavScreen(
|
||||||
viewModel: RootNavViewModel = viewModel()
|
viewModel: RootNavViewModel = viewModel(),
|
||||||
) {
|
) {
|
||||||
val navController = rememberNavController()
|
val navController = rememberNavController()
|
||||||
val state by viewModel.state.collectAsStateWithLifecycle()
|
val state by viewModel.state.collectAsStateWithLifecycle()
|
||||||
|
@ -49,6 +49,7 @@ fun RootNavScreen(
|
||||||
/**
|
/**
|
||||||
* TODO: move to splash package (BIT-147)
|
* TODO: move to splash package (BIT-147)
|
||||||
*/
|
*/
|
||||||
|
@Suppress("TopLevelPropertyNaming")
|
||||||
private const val SplashRoute = "splash"
|
private const val SplashRoute = "splash"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +82,8 @@ private fun NavController.navigateToSplashAsRoot() {
|
||||||
/**
|
/**
|
||||||
* TODO move to login package(BIT-146)
|
* TODO move to login package(BIT-146)
|
||||||
*/
|
*/
|
||||||
private val LoginRoute = "login"
|
@Suppress("TopLevelPropertyNaming")
|
||||||
|
private const val LoginRoute = "login"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add login destinations to the nav graph.
|
* Add login destinations to the nav graph.
|
||||||
|
|
|
@ -21,11 +21,11 @@ class RootNavViewModel @Inject constructor() : ViewModel() {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
|
@Suppress("MagicNumber")
|
||||||
delay(1000)
|
delay(1000)
|
||||||
_state.value = RootNavState.Login
|
_state.value = RootNavState.Login
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue