Rewriting classes in kotlin

This commit is contained in:
antonio 2023-03-02 10:48:30 +01:00
parent 74ec37cb5e
commit 103cd308de
43 changed files with 818 additions and 2325 deletions

View 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"
}
}