-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
app/shared/app-data/src/commonMain/kotlin/domain/danmaku/DanmakuLoadingState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2024 OpenAni and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link. | ||
* | ||
* https://github.com/open-ani/ani/blob/main/LICENSE | ||
*/ | ||
|
||
package me.him188.ani.app.domain.danmaku | ||
|
||
import androidx.compose.runtime.Immutable | ||
import me.him188.ani.danmaku.api.DanmakuMatchInfo | ||
|
||
@Immutable | ||
sealed class DanmakuLoadingState { | ||
@Immutable | ||
data object Idle : DanmakuLoadingState() | ||
|
||
@Immutable | ||
data object Loading : DanmakuLoadingState() | ||
|
||
@Immutable | ||
data class Success( | ||
val matchInfos: List<DanmakuMatchInfo> | ||
) : DanmakuLoadingState() | ||
|
||
@Immutable | ||
data class Failed( | ||
val cause: Throwable, | ||
) : DanmakuLoadingState() | ||
} |