#1116 - Fix crash when attaching image on pre-7.1

This commit is contained in:
Moez Bhatti
2018-05-03 00:15:30 -04:00
parent e4bd882f35
commit d5202ac479
3 changed files with 34 additions and 36 deletions
@@ -21,10 +21,10 @@ package feature.compose
import android.content.Context
import android.net.Uri
import android.os.Build
import android.view.inputmethod.InputContentInfo
import android.support.v13.view.inputmethod.InputContentInfoCompat
import com.google.android.mms.ContentType
data class Attachment(private val uri: Uri? = null, private val inputContent: InputContentInfo? = null) {
data class Attachment(private val uri: Uri? = null, private val inputContent: InputContentInfoCompat? = null) {
fun getUri(): Uri? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
@@ -18,7 +18,7 @@
*/
package feature.compose
import android.view.inputmethod.InputContentInfo
import android.support.v13.view.inputmethod.InputContentInfoCompat
import common.MenuItem
import common.base.QkView
import io.reactivex.Observable
@@ -46,7 +46,7 @@ interface ComposeView : QkView<ComposeState> {
val attachIntent: Observable<Unit>
val cameraIntent: Observable<*>
val galleryIntent: Observable<*>
val inputContentIntent: Observable<InputContentInfo>
val inputContentIntent: Observable<InputContentInfoCompat>
val sendIntent: Observable<Unit>
fun showMenu(menuItems: List<MenuItem>)