mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Rewriting classes in kotlin
This commit is contained in:
parent
74ec37cb5e
commit
103cd308de
43 changed files with 818 additions and 2325 deletions
28
app/src/main/java/com/cappielloantonio/play/model/Genre.kt
Normal file
28
app/src/main/java/com/cappielloantonio/play/model/Genre.kt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package com.cappielloantonio.play.model
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.annotation.Keep
|
||||
import com.cappielloantonio.play.subsonic.models.Genre
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Keep
|
||||
@Parcelize
|
||||
class Genre(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val songCount: Int = 0,
|
||||
val albumCount: Int = 0
|
||||
) : Parcelable {
|
||||
|
||||
constructor(genre: Genre) : this(
|
||||
genre.genre,
|
||||
genre.genre,
|
||||
genre.songCount,
|
||||
genre.albumCount
|
||||
)
|
||||
|
||||
companion object {
|
||||
const val ORDER_BY_NAME = "ORDER_BY_NAME"
|
||||
const val ORDER_BY_RANDOM = "ORDER_BY_RANDOM"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue