mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2024-12-02 10:56:28 +00:00
Use data object when applicable
This commit is contained in:
parent
b03cd05bc5
commit
c482d488d4
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -1,3 +1,3 @@
|
||||
package org.jellyfin.androidtv.data.querying
|
||||
|
||||
object ViewQuery
|
||||
data object ViewQuery
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user