Revert "Simplification"

This reverts commit a22fcc9064.
This commit is contained in:
M66B
2020-01-02 20:07:53 +01:00
parent c45757c73b
commit e9c8f0c1b4
3 changed files with 33 additions and 10 deletions

View File

@@ -2734,8 +2734,15 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
private void check() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
adapter.checkInternet();
Activity activity = getActivity();
if (activity != null)
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
adapter.checkInternet();
}
});
}
};