Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use data object when applicable #3350

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -20,4 +20,4 @@ data class PendingQuickConnectState(val code: String) : QuickConnectState()
/**
* User connected.
*/
object ConnectedQuickConnectState : QuickConnectState()
data object ConnectedQuickConnectState : QuickConnectState()
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package org.jellyfin.androidtv.data.querying

object ViewQuery
data object ViewQuery
2 changes: 1 addition & 1 deletion playback/core/src/main/kotlin/queue/EmptyQueue.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}