Fix possible crash where tooltip is dismissed after fragment is detached.
This commit is contained in:
parent
1006af7d8a
commit
ba3dd79d4e
1 changed files with 4 additions and 1 deletions
|
@ -60,7 +60,10 @@ class StoryTextLoader(
|
|||
contentView.layout(0, 0, contentView.measuredWidth, contentView.measuredHeight)
|
||||
|
||||
fragment.displayInDialogAboveAnchor(view, contentView, windowDim = 0f, onDismiss = {
|
||||
callback.setIsDisplayingLinkPreviewTooltip(false)
|
||||
val activity = fragment.activity
|
||||
if (activity != null) {
|
||||
callback.setIsDisplayingLinkPreviewTooltip(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue