diff options
author | Alex Burka <aburka@seas.upenn.edu> | 2019-09-30 00:58:20 -0400 |
---|---|---|
committer | Harsh Shandilya <msfjarvis@gmail.com> | 2019-09-30 10:28:20 +0530 |
commit | 4169af453b04d1e1895ce8295409490570dea7fb (patch) | |
tree | 55b1804a58ba6df16455551e09e9da781db93828 /app/src/main/java | |
parent | 77efadc8aee2075ce3bffd8005454029d4f9f435 (diff) |
don't update nonexistent progress bar (#549)
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 6 |
1 files changed, 3 insertions, 3 deletions
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<Void, Int, Boolean>() { - 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 } } |