From 4169af453b04d1e1895ce8295409490570dea7fb Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Mon, 30 Sep 2019 00:58:20 -0400 Subject: don't update nonexistent progress bar (#549) --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt index 70e10561..665e8b7b 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt @@ -722,7 +722,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { @Suppress("StaticFieldLeak") inner class DelayShow(val activity: PgpActivity) : AsyncTask() { - private val pb: ProgressBar by lazy { pbLoading } + private val pb: ProgressBar? by lazy { pbLoading } private var skip = false private var cancelNotify = ConditionVariable() @@ -761,7 +761,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { // treat 0 as forever, and the user must exit and/or clear clipboard on their own cancel(true) } else { - this.pb.max = showTime + this.pb?.max = showTime } } @@ -814,7 +814,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound { } override fun onProgressUpdate(vararg values: Int?) { - this.pb.progress = values[0] ?: 0 + this.pb?.progress = values[0] ?: 0 } } -- cgit v1.2.3