Created
January 3, 2020 11:04
-
-
Save Krishna21Soni13/690de3b0897a6774550424e3a37c2da1 to your computer and use it in GitHub Desktop.
Configure the MessageViewModel
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
private func configureViewModel() { | |
messageViewModel.arrMessage.subscribe { [weak self] (result: [Message]) in | |
guard let self = self else { | |
return | |
} | |
self.reloadData() | |
self.scrollToBottom(animated: false) | |
} | |
messageViewModel.getMessagesFromServer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment