Show toast when attachment button is clicked

This commit is contained in:
Moez Bhatti
2017-12-25 18:01:12 -05:00
parent 6d43c8e06f
commit c7a4cfefd9
2 changed files with 5 additions and 0 deletions
@@ -171,6 +171,10 @@ class ComposeViewModel(threadId: Long, body: String)
.withLatestFrom(conversation, { _, conversation -> conversation })
.subscribe { conversation -> deleteConversation.execute(conversation.id) }
// Add an attachment
intents += view.attachIntent
.subscribe { context.makeToast(R.string.compose_attach_unsupported) }
// Enable the send button when there is text input into the new message body, disable otherwise
intents += view.textChangedIntent.subscribe { text ->
newState { it.copy(draft = text.toString(), canSend = text.isNotEmpty()) }
+1
View File
@@ -21,6 +21,7 @@
<string name="main_syncing">Optimizing database, this might take a minute…</string>
<string name="compose_attach_unsupported">MMS support will be added shortly!</string>
<string name="compose_hint">Write a message…</string>
<string name="message_status_sending">Sending…</string>