mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Merge pull request #1998 from nextcloud/bugfix/1974/fixViewBindingNPE
fix NPE for viewbinding
This commit is contained in:
commit
bddbf48198
@ -347,15 +347,22 @@ class ServerSelectionController :
|
|||||||
setCertTextView()
|
setCertTextView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("LongLogTag")
|
||||||
private fun setCertTextView() {
|
private fun setCertTextView() {
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity!!.runOnUiThread {
|
activity!!.runOnUiThread {
|
||||||
if (!TextUtils.isEmpty(appPreferences!!.temporaryClientCertAlias)) {
|
try {
|
||||||
binding.certTextView.setText(R.string.nc_change_cert_auth)
|
if (!TextUtils.isEmpty(appPreferences!!.temporaryClientCertAlias)) {
|
||||||
} else {
|
binding.certTextView.setText(R.string.nc_change_cert_auth)
|
||||||
binding.certTextView.setText(R.string.nc_configure_cert_auth)
|
} else {
|
||||||
|
binding.certTextView.setText(R.string.nc_configure_cert_auth)
|
||||||
|
}
|
||||||
|
hideserverEntryProgressBar()
|
||||||
|
} catch (npe: java.lang.NullPointerException) {
|
||||||
|
// view binding can be null
|
||||||
|
// since this is called asynchronously and UI might have been destroyed in the meantime
|
||||||
|
Log.i(TAG, "UI destroyed - view binding already gone")
|
||||||
}
|
}
|
||||||
hideserverEntryProgressBar()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user