Package io.rong.imkit.base
Class BaseViewModel
-
- All Implemented Interfaces:
public class BaseViewModel extends ViewModelViewModel 基类,提供错误事件的 LiveData。
- Since:
5.10.4
rongcloud
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected abstract classBaseViewModel.SafeDataHandler安全的数据处理器,处理数据变化和错误
-
Field Summary
Fields Modifier and Type Field Description protected final MutableLiveData<ErrorEvent<IRongCoreEnum.CoreErrorCode>>errorEventLiveData
-
Constructor Summary
Constructors Constructor Description BaseViewModel(Bundle bundle)
-
Method Summary
Modifier and Type Method Description final BundlegetArguments()MutableLiveData<ErrorEvent<IRongCoreEnum.CoreErrorCode>>getErrorEventLiveData()获取错误事件的 LiveData,用于观察错误状态。 voidpostErrorEvent(ErrorEvent<IRongCoreEnum.CoreErrorCode> errorEvent)发送页面级别事件 -
-
Method Detail
-
getArguments
final Bundle getArguments()
-
getErrorEventLiveData
MutableLiveData<ErrorEvent<IRongCoreEnum.CoreErrorCode>> getErrorEventLiveData()
获取错误事件的 LiveData,用于观察错误状态。
- Returns:
MutableLiveData< ?>>
-
postErrorEvent
void postErrorEvent(ErrorEvent<IRongCoreEnum.CoreErrorCode> errorEvent)
发送页面级别事件
- Parameters:
errorEvent- 页面级别事件
-
-
-
-