Fix lint issues

This commit is contained in:
Arkadiusz Fal
2023-06-17 14:09:51 +02:00
parent b12933e61d
commit e827b97cd5
40 changed files with 130 additions and 101 deletions

View File

@@ -47,7 +47,7 @@ struct FavoriteItem: Codable, Equatable, Identifiable, Defaults.Serializable {
}
}
static func == (lhs: FavoriteItem, rhs: FavoriteItem) -> Bool {
static func == (lhs: Self, rhs: Self) -> Bool {
lhs.section == rhs.section
}

View File

@@ -17,7 +17,11 @@ struct FavoritesModel {
}
func toggle(_ item: FavoriteItem) {
contains(item) ? remove(item) : add(item)
if contains(item) {
remove(item)
} else {
add(item)
}
}
func add(_ item: FavoriteItem) {