Skip to content

Commit

Permalink
LikeButton: set checkmark icon for critters
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed May 10, 2020
1 parent fdd9413 commit d832af2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ACHNBrowserUI/ACHNBrowserUI/views/shared/LikeButtonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@ struct LikeButtonView: View {

var imageName: String {
if item != nil {
return isInCollection ? "star.fill" : "star"
if item?.isCritter == true {
return isInCollection ? "checkmark.seal.fill" : "checkmark.seal"
} else {
return isInCollection ? "star.fill" : "star"
}
} else {
return isInCollection ? "heart.fill" : "heart"
}
}

var color: Color {
item != nil ? .yellow : .red
if item != nil {
if item?.isCritter == true {
return .acTabBarBackground
}
return .yellow
}
return .red
}

var body: some View {
Expand Down

0 comments on commit d832af2

Please sign in to comment.