From c03c7d2c6e1a631a27aedc88b620f557a99fde38 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 2 Jul 2017 23:16:22 -0700 Subject: [PATCH] Clean up unnecessary nonnulls --- .idea/misc.xml | 2 +- .travis.yml | 1 - app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt | 6 +++--- .../kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt | 5 +++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 7319f0219..085136f8d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -53,7 +53,7 @@ - + diff --git a/.travis.yml b/.travis.yml index edff3fffb..e3e269ffa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ before_install: after_success: - chmod +x ./generate-apk-release.sh - "./generate-apk-release.sh" -- "./gradlew app:publishApkRelease" deploy: provider: script script: "./gradlew app:publishApkRelease" diff --git a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt index cd6c22556..da70714d7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/LoginActivity.kt @@ -46,10 +46,10 @@ class LoginActivity : BaseActivity() { val textview: AppCompatTextView by bindView(R.id.textview) val profile: ImageView by bindView(R.id.profile) - val loginObservable = SingleSubject.create()!! + val loginObservable = SingleSubject.create() val progressObservable = BehaviorSubject.create()!! - val profileObservable = SingleSubject.create()!! - val usernameObservable = SingleSubject.create()!! + val profileObservable = SingleSubject.create() + val usernameObservable = SingleSubject.create() // Helper to set and enable swipeRefresh var refresh: Boolean diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt index 74dafd418..3def6d253 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClient.kt @@ -1,6 +1,8 @@ package com.pitchedapps.frost.web +import android.net.Uri import android.webkit.ConsoleMessage +import android.webkit.ValueCallback import android.webkit.WebChromeClient import android.webkit.WebView import com.pitchedapps.frost.utils.L @@ -31,4 +33,7 @@ class FrostChromeClient(webCore: FrostWebViewCore) : WebChromeClient() { progressObservable.onNext(newProgress) } + override fun onShowFileChooser(webView: WebView, filePathCallback: ValueCallback>?, fileChooserParams: FileChooserParams?): Boolean { + return super.onShowFileChooser(webView, filePathCallback, fileChooserParams) + } } \ No newline at end of file