gh-pages / com.nextfaze.devfun.internal.android / BaseDialogFragment / onPerformDismiss

onPerformDismiss

open fun onPerformDismiss(): Unit (source)

We will not get an onDismiss callback if a dialog fragment is opened on an activity that is then finished while the dialog is open. However we generally want to clean up if we are destroyed, so worst-case we perform the dismiss callback then if it hasn’t already happened.

We do this instead of (only using) onDestroy as the destroy callback can/will happen a few messenger loops after dismiss which can cause some annoying UI bugs.