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( ...@@ -338,12 +338,9 @@ class ChatRoomPresenter @Inject constructor(
val maxFileSizeAllowed = settings.uploadMaxFileSize() val maxFileSizeAllowed = settings.uploadMaxFileSize()
when { when {
fileName.isEmpty() -> { fileName.isEmpty() -> view.showInvalidFileMessage()
view.showInvalidFileMessage() fileSize > maxFileSizeAllowed && maxFileSizeAllowed !in -1..0 ->
}
fileSize > maxFileSizeAllowed -> {
view.showInvalidFileSize(fileSize, maxFileSizeAllowed) view.showInvalidFileSize(fileSize, maxFileSizeAllowed)
}
else -> { else -> {
var inputStream: InputStream? = uriInteractor.getInputStream(uri) var inputStream: InputStream? = uriInteractor.getInputStream(uri)
......
...@@ -10,7 +10,7 @@ buildscript { ...@@ -10,7 +10,7 @@ buildscript {
} }
dependencies { 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.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.google.gms:google-services:4.0.2' 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