Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bpedryc committed Nov 23, 2023
1 parent e374c35 commit 81953eb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -99,7 +100,7 @@ fun BreedsScreenContent(
}

@Composable
fun Empty() {
private fun Empty() {
Column(
modifier = Modifier
.fillMaxSize()
Expand All @@ -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<Breed>,
onBreedClick: (breedId: Long) -> Unit
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -36,7 +35,6 @@ fun MainNavCoordinator() {
val breedId = it.arguments?.getLong(BREED_ID_ARG)
BreedDetailsScreen(
viewModel = koinViewModel { parametersOf(breedId) },
log = get { parametersOf("BreedDetailsScreen") }
)
}
}
Expand Down
9 changes: 9 additions & 0 deletions ios/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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
)

0 comments on commit 81953eb

Please sign in to comment.