Use data object when applicable

This commit is contained in:
Niels van Velzen 2024-02-05 21:52:47 +01:00 committed by Niels van Velzen
parent b03cd05bc5
commit c482d488d4
4 changed files with 9 additions and 9 deletions

View File

@ -3,9 +3,9 @@ package org.jellyfin.androidtv.auth.model
import org.jellyfin.sdk.api.client.exception.ApiClientException
sealed class LoginState
object AuthenticatingState : LoginState()
object RequireSignInState : LoginState()
object ServerUnavailableState : LoginState()
data object AuthenticatingState : LoginState()
data object RequireSignInState : LoginState()
data object ServerUnavailableState : LoginState()
data class ServerVersionNotSupported(val server: Server) : LoginState()
data class ApiClientErrorLoginState(val error: ApiClientException) : LoginState()
object AuthenticatedState : LoginState()
data object AuthenticatedState : LoginState()

View File

@ -5,12 +5,12 @@ sealed class QuickConnectState
/**
* State unknown untill first poll completed.
*/
object UnknownQuickConnectState : QuickConnectState()
data object UnknownQuickConnectState : QuickConnectState()
/**
* Server does not have QuickConnect enabled.
*/
object UnavailableQuickConnectState : QuickConnectState()
data object UnavailableQuickConnectState : QuickConnectState()
/**
* Connection is pending.
@ -20,4 +20,4 @@ data class PendingQuickConnectState(val code: String) : QuickConnectState()
/**
* User connected.
*/
object ConnectedQuickConnectState : QuickConnectState()
data object ConnectedQuickConnectState : QuickConnectState()

View File

@ -1,3 +1,3 @@
package org.jellyfin.androidtv.data.querying
object ViewQuery
data object ViewQuery

View File

@ -2,7 +2,7 @@ package org.jellyfin.playback.core.queue
import org.jellyfin.playback.core.queue.item.QueueEntry
object EmptyQueue : Queue {
data object EmptyQueue : Queue {
override val size: Int = 0
override suspend fun getItem(index: Int): QueueEntry? = null
}