mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
parent
c45757c73b
commit
e9c8f0c1b4
3 changed files with 33 additions and 10 deletions
|
@ -917,9 +917,16 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
|
||||
private void check() {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
checkInternet();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
private void checkInternet() {
|
||||
|
|
|
@ -2734,9 +2734,16 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
}
|
||||
|
||||
private void check() {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
adapter.checkInternet();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
private boolean checkReporting() {
|
||||
|
|
|
@ -277,6 +277,13 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|||
};
|
||||
|
||||
private void showConnectionType() {
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity == null)
|
||||
return;
|
||||
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
|
||||
ConnectionHelper.NetworkState networkState = ConnectionHelper.getNetworkState(getContext());
|
||||
|
||||
|
@ -285,4 +292,6 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
|||
tvConnectionRoaming.setVisibility(networkState.isRoaming() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue