BugFix for now showing the error message when the phone can't open the file
This commit is contained in:
@@ -61,11 +61,13 @@ open class NewMediaModel : ViewModel() {
|
|||||||
contentResolver.openInputStream(uri)?.use {
|
contentResolver.openInputStream(uri)?.use {
|
||||||
createNIP95Record(it.readBytes(), contentType, description)
|
createNIP95Record(it.readBytes(), contentType, description)
|
||||||
}
|
}
|
||||||
?: viewModelScope.launch {
|
?: run {
|
||||||
imageUploadingError.emit("Failed to upload the image / video")
|
viewModelScope.launch {
|
||||||
isUploadingImage = false
|
imageUploadingError.emit("Failed to upload the image / video")
|
||||||
uploadingPercentage.value = 0.00f
|
isUploadingImage = false
|
||||||
uploadingDescription.value = null
|
uploadingPercentage.value = 0.00f
|
||||||
|
uploadingDescription.value = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uploadingPercentage.value = 0.1f
|
uploadingPercentage.value = 0.1f
|
||||||
|
|||||||
Reference in New Issue
Block a user