mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Run UI actions only when the activity is added to the fragment.
This is different from the previous behavior where we only check if it is not detached.
This commit is contained in:
@@ -85,7 +85,7 @@ public abstract class BaseFragment extends Fragment
|
||||
activity.runOnUiThread(() -> {
|
||||
// Note that we don't have to check if the activity has
|
||||
// been destroyed as the Fragment has not been detached yet
|
||||
if (!isDetached() && !activity.isFinishing()) {
|
||||
if (isAdded() && !activity.isFinishing()) {
|
||||
r.run();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user