-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow shuffle sorting of the album list
improve library refreshes to not lose selection in album view and tag view
- Loading branch information
1 parent
45363ec
commit 22564e8
Showing
5 changed files
with
65 additions
and
45 deletions.
There are no files selected for viewing
23 changes: 2 additions & 21 deletions
23
common/src/main/kotlin/com/github/wakingrufus/jamm/common/AlbumKey.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,5 @@ | ||
package com.github.wakingrufus.jamm.common | ||
|
||
class AlbumKey(val id: String?, val albumArtist: String, val albumName: String) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as AlbumKey | ||
|
||
if (id != null && id == other.id) return true | ||
if (albumArtist != other.albumArtist) return false | ||
if (albumName != other.albumName) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
return id?.hashCode() ?: (31 * albumArtist.hashCode() + albumName.hashCode()) | ||
} | ||
|
||
override fun toString(): String { | ||
return "AlbumKey(id=$id, albumArtist='$albumArtist', albumName='$albumName')" | ||
} | ||
data class AlbumKey(val albumArtist: String, val albumName: String) { | ||
var id: String? = null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters