Created
March 14, 2022 00:13
-
-
Save steliosfran/fdd9da44bb38fa33987318690e8a65f7 to your computer and use it in GitHub Desktop.
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
class ChatViewModel( | |
private val chatLogic: ChatLogic | |
) : ViewModel() { | |
fun observeChatMessages() { | |
chatLogic.chatMessages | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe({ | |
// On next: update the state | |
}, { | |
// On error: update the state | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment