Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class LiveStreamViewModel() : ViewModel() {
private val chatClient = ChatClient.instance()
private val _viewState = MutableLiveData<State>()
private lateinit var channelController: ChannelController
val viewState: LiveData<State> = _viewState
init {
chatClient.setUser(chatUser, USER_TOKEN, object : InitConnectionListener() {
override fun onSuccess(data: ConnectionData) {
channelController =, CHANNEL_ID)
override fun onError(error: ChatError) {
_viewState.postValue(State.Error("User setting error"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.