Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bpedryc committed Aug 4, 2023
1 parent 2cdaa90 commit 0275873
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/src/main/kotlin/co/touchlab/kampkit/android/MainApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MainApp : Application() {
viewModel {
BreedsViewModel(get(), get { parametersOf("BreedsViewModel") })
}
viewModel {params ->
viewModel { params ->
BreedDetailsViewModel(
params.get(), get(), get { parametersOf("BreedDetailsViewModel") }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ fun DogRow(breed: Breed, onClick: (Breed) -> Unit) {

@Composable
fun FavoriteIcon(breed: Breed) {
if (!breed.favorite) {
if (breed.favorite) {
Image(
painter = painterResource(id = R.drawable.ic_favorite_border_24px),
contentDescription = stringResource(R.string.favorite_breed, breed.name)
painter = painterResource(id = R.drawable.ic_favorite_24px),
contentDescription = stringResource(R.string.unfavorite_breed, breed.name)
)
} else {
Image(
painter = painterResource(id = R.drawable.ic_favorite_24px),
contentDescription = stringResource(R.string.unfavorite_breed, breed.name)
painter = painterResource(id = R.drawable.ic_favorite_border_24px),
contentDescription = stringResource(R.string.favorite_breed, breed.name)
)
}
}
Expand Down

0 comments on commit 0275873

Please sign in to comment.