fixed dm conversation media attachment

This commit is contained in:
Mariotaku Lee 2017-02-16 02:17:09 +08:00
parent 6ca2e504a2
commit 20e5e70564
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 2 additions and 2 deletions

View File

@ -271,12 +271,12 @@ class MessagesConversationFragment : AbsContentListRecyclerViewFragment<Messages
private fun performSendMessage() {
val conversation = adapter.conversation ?: return
val conversationAccount = this.account ?: return
if (editText.empty && adapter.itemCount == 0) {
if (editText.empty && mediaPreviewAdapter.itemCount == 0) {
editText.error = getString(R.string.hint_error_message_no_content)
return
}
if (conversationAccount.isOfficial(context)) {
if (adapter.itemCount > defaultFeatures.twitterDirectMessageMediaLimit) {
if (mediaPreviewAdapter.itemCount > defaultFeatures.twitterDirectMessageMediaLimit) {
editText.error = getString(R.string.error_message_media_message_too_many)
return
} else {