Commit f0e70ce9 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix the maxFileSizeAllowed validation when uploading a file.

parent 960de03e
......@@ -338,12 +338,9 @@ class ChatRoomPresenter @Inject constructor(
val maxFileSizeAllowed = settings.uploadMaxFileSize()
when {
fileName.isEmpty() -> {
view.showInvalidFileMessage()
}
fileSize > maxFileSizeAllowed -> {
fileName.isEmpty() -> view.showInvalidFileMessage()
fileSize > maxFileSizeAllowed && maxFileSizeAllowed !in -1..0 ->
view.showInvalidFileSize(fileSize, maxFileSizeAllowed)
}
else -> {
var inputStream: InputStream? = uriInteractor.getInputStream(uri)
......
......@@ -10,7 +10,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
classpath 'com.android.tools.build:gradle:3.3.0-alpha04'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.google.gms:google-services:4.0.2'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment