crash fixes

This commit is contained in:
Mariotaku Lee 2017-07-07 20:48:30 +08:00
parent 34ca66b08d
commit 53657c0b51
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 4 additions and 3 deletions

View File

@ -79,8 +79,9 @@ abstract class AbsStatusDialogFragment : BaseDialogFragment() {
adapter.showAccountsColor = true
val dialog = builder.create()
dialog.onShow { dialog ->
dialog.applyTheme()
dialog.onShow {
val context = it.context ?: return@onShow
it.applyTheme()
val am = AccountManager.get(context)
val details = AccountUtils.getAccountDetails(am, accountKey, true) ?: run {
@ -88,7 +89,7 @@ abstract class AbsStatusDialogFragment : BaseDialogFragment() {
return@onShow
}
val weakThis = WeakReference(this)
val weakHolder = WeakReference(StatusViewHolder(adapter = adapter, itemView = dialog.itemContent).apply {
val weakHolder = WeakReference(StatusViewHolder(adapter = adapter, itemView = it.itemContent).apply {
setupViewOptions()
})
val extraStatus = status