Package ai.nexconn.chatui.base
Class BaseViewModel
-
- All Implemented Interfaces:
public class BaseViewModel extends ViewModelBase ViewModel providing error event LiveData.
- Since:
5.10.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected abstract classBaseViewModel.SafeDataHandlerSafe data handler that processes data changes and errors.
-
Field Summary
Fields Modifier and Type Field Description protected final MutableLiveData<ErrorEvent<NCError>>errorEventLiveData
-
Constructor Summary
Constructors Constructor Description BaseViewModel(Bundle bundle)
-
Method Summary
Modifier and Type Method Description final BundlegetArguments()MutableLiveData<ErrorEvent<NCError>>getErrorEventLiveData()Returns the error event LiveData for observing error states. voidpostErrorEvent(ErrorEvent<NCError> errorEvent)Posts a page-level error event. -
-
Method Detail
-
getArguments
final Bundle getArguments()
-
getErrorEventLiveData
MutableLiveData<ErrorEvent<NCError>> getErrorEventLiveData()
Returns the error event LiveData for observing error states.
- Returns:
MutableLiveData
-
postErrorEvent
void postErrorEvent(ErrorEvent<NCError> errorEvent)
Posts a page-level error event.
- Parameters:
errorEvent- the error event
-
-
-
-