封装BaseViewModel

This commit is contained in:
Hsy
2025-10-15 15:03:16 +08:00
parent 6e8529caad
commit 05ff710872
24 changed files with 727 additions and 333 deletions

View File

@@ -1,5 +1,7 @@
package com.taskttl.data.state
import com.taskttl.core.viewmodel.BaseUiState
/**
* 设置状态
* @author DevTTL
@@ -9,9 +11,10 @@ package com.taskttl.data.state
* @param [error] 错误
*/
data class SettingsState(
val isLoading: Boolean = false,
val error: String? = null,
)
override val isLoading: Boolean = false,
override val isProcessing: Boolean = false,
override val error: String? = null,
) : BaseUiState()
/**
* 设置意图
@@ -25,7 +28,7 @@ sealed class SettingsIntent {
* @author DevTTL
* @date 2025/10/14
*/
object OpenAppRating: SettingsIntent()
object OpenAppRating : SettingsIntent()
/**
* 打开网址
@@ -34,7 +37,7 @@ sealed class SettingsIntent {
* @constructor 创建[OpenUrl]
* @param [url] 网址
*/
class OpenUrl(val url:String): SettingsIntent()
class OpenUrl(val url: String) : SettingsIntent()
}