Skip to content

Commit

Permalink
fix(scrobbles): trigger update when loved field changes
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jul 8, 2022
1 parent 69e0a57 commit 311e827
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firstfm/Models/LastFM/Track.swift
Expand Up @@ -16,13 +16,14 @@ struct Track: Codable, Identifiable {
struct ScrobbledTrack: Codable, Identifiable, Equatable, Hashable {
// swiftlint:disable:next operator_whitespace
static func ==(lhs: ScrobbledTrack, rhs: ScrobbledTrack) -> Bool {
lhs.name == rhs.name && lhs.artist == rhs.artist && lhs.date == rhs.date
lhs.name == rhs.name && lhs.artist == rhs.artist && lhs.date == rhs.date && lhs.loved == rhs.loved
}

func hash(into hasher: inout Hasher) {
hasher.combine(name)
hasher.combine(artist)
hasher.combine(date)
hasher.combine(loved)
}

var id: String {
Expand Down

0 comments on commit 311e827

Please sign in to comment.