mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-18 20:08:53 +01:00
Make callback optional for Interactors
This commit is contained in:
+2
-2
@@ -32,12 +32,12 @@ class ConversationListViewModel : ViewModel() {
|
||||
conversations = messageRepo.getConversationMessagesAsync()
|
||||
partialStates.onNext(PartialState.ConversationsLoaded(conversations))
|
||||
|
||||
markAllSeen.execute({}, Unit)
|
||||
markAllSeen.execute(Unit)
|
||||
}
|
||||
|
||||
fun onRefresh() {
|
||||
partialStates.onNext(PartialState.Refreshing(true))
|
||||
syncConversations.execute({ partialStates.onNext(PartialState.Refreshing(false)) }, Unit)
|
||||
syncConversations.execute(Unit, { partialStates.onNext(PartialState.Refreshing(false)) })
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
|
||||
@@ -52,13 +52,13 @@ class MessageListViewModel : ViewModel() {
|
||||
|
||||
fun sendMessage(body: String) {
|
||||
conversation?.takeIf { conversation -> conversation.isValid }?.let { conversation ->
|
||||
sendMessage.execute({}, SendMessage.Params(threadId, conversation.contacts[0].address, body))
|
||||
sendMessage.execute(SendMessage.Params(threadId, conversation.contacts[0].address, body))
|
||||
partialStates.onNext(PartialState.TextChanged(""))
|
||||
}
|
||||
}
|
||||
|
||||
fun dataChanged() {
|
||||
markRead.execute({}, threadId)
|
||||
markRead.execute(threadId)
|
||||
}
|
||||
|
||||
fun textChanged(text: String) {
|
||||
|
||||
Reference in New Issue
Block a user