diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedDetailsScreen.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedDetailsScreen.kt index 50fe89ea..7fa9c0c6 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedDetailsScreen.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedDetailsScreen.kt @@ -5,17 +5,14 @@ import androidx.compose.animation.core.FastOutSlowInEasing import androidx.compose.animation.core.TweenSpec import androidx.compose.foundation.Image import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.BoxScope -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.* +import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp @@ -57,13 +54,15 @@ private fun BoxScope.DetailsContents( } } } + @Composable private fun Error(error: String) { - Text(error) + Text(error, color = Color.Red) } + @Composable fun Loading() { - Text("Loading") + CircularProgressIndicator() } @Composable diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedsScreen.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedsScreen.kt index c1bd08b3..ac905db0 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedsScreen.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/BreedsScreen.kt @@ -20,6 +20,7 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -99,7 +100,7 @@ fun BreedsScreenContent( } @Composable -fun Empty() { +private fun Empty() { Column( modifier = Modifier .fillMaxSize() @@ -120,12 +121,12 @@ private fun Error(error: String) { verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { - Text(text = error) + Text(text = error, color = Color.Red) } } @Composable -fun Success( +private fun Success( successData: List, onBreedClick: (breedId: Long) -> Unit ) { diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/MainNavCoordinator.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/MainNavCoordinator.kt index 4ec264a3..426640e2 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/MainNavCoordinator.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/MainNavCoordinator.kt @@ -12,7 +12,6 @@ import org.koin.androidx.compose.koinViewModel import org.koin.core.parameter.parametersOf private const val BREEDS = "breeds" - private const val BREED_DETAILS = "breedDetails" private const val BREED_ID_ARG = "breedId" @@ -36,7 +35,6 @@ fun MainNavCoordinator() { val breedId = it.arguments?.getLong(BREED_ID_ARG) BreedDetailsScreen( viewModel = koinViewModel { parametersOf(breedId) }, - log = get { parametersOf("BreedDetailsScreen") } ) } } diff --git a/ios/Pods/Pods.xcodeproj/project.pbxproj b/ios/Pods/Pods.xcodeproj/project.pbxproj index 79a804f9..193e5a24 100644 --- a/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -93,6 +93,7 @@ 46EB2E00000080 /* Pods */, 46EB2E00000020 /* Products */, 46EB2E00000070 /* Targets Support Files */, + 57975FCC640FD6F802D419B1 /* xcschemes */, ); sourceTree = ""; }; @@ -217,6 +218,14 @@ path = "Target Support Files/Pods-KaMPKitiOS"; sourceTree = ""; }; + 57975FCC640FD6F802D419B1 /* xcschemes */ = { + isa = PBXGroup; + children = ( + ); + name = xcschemes; + path = Pods.xcodeproj/xcuserdata/bartlomiejpedryc.xcuserdatad/xcschemes; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ diff --git a/shared/src/commonMain/kotlin/co/touchlab/kampkit/domain/breed/Breed.kt b/shared/src/commonMain/kotlin/co/touchlab/kampkit/domain/breed/Breed.kt index 2711e940..27c7787e 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/kampkit/domain/breed/Breed.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/kampkit/domain/breed/Breed.kt @@ -1,7 +1,7 @@ package co.touchlab.kampkit.domain.breed data class Breed( - val id: Long = 0, - val name: String = "", - val favorite: Boolean = false + val id: Long, + val name: String, + val favorite: Boolean )