prevent from dialog fragment crashing
This commit is contained in:
parent
399494ec5b
commit
101d63acec
|
@ -201,11 +201,11 @@ class StatusFragment : BaseFragment(), LoaderCallbacks<SingleResponse<Parcelable
|
|||
removeSpan(dialogSpan)
|
||||
setSpan(object : ClickableSpan() {
|
||||
override fun onClick(widget: View) {
|
||||
val activity = activity
|
||||
if (activity == null || activity.isFinishing) return
|
||||
MessageDialogFragment.show(activity.supportFragmentManager,
|
||||
message = getString(R.string.cant_load_all_replies_explanation),
|
||||
tag = "cant_load_all_replies_explanation")
|
||||
executeAfterFragmentResumed {
|
||||
MessageDialogFragment.show(it.childFragmentManager,
|
||||
message = getString(R.string.cant_load_all_replies_explanation),
|
||||
tag = "cant_load_all_replies_explanation")
|
||||
}
|
||||
}
|
||||
}, spanStart, spanEnd, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue