Keep network state

This commit is contained in:
M66B
2019-03-16 13:12:31 +00:00
parent fa579d3c10
commit 4ca5cd0540
11 changed files with 94 additions and 53 deletions

View File

@@ -714,13 +714,13 @@ public class FragmentCompose extends FragmentBase {
};
private void checkInternet() {
boolean internet = Helper.suitableNetwork(getContext(), false);
boolean suitable = Helper.getNetworkState(getContext()).isSuitable();
Boolean content = (Boolean) tvNoInternet.getTag();
tvNoInternet.setVisibility(!internet && content != null && !content ? View.VISIBLE : View.GONE);
tvNoInternet.setVisibility(!suitable && content != null && !content ? View.VISIBLE : View.GONE);
Boolean downloading = (Boolean) rvAttachment.getTag();
tvNoInternetAttachments.setVisibility(!internet && downloading != null && downloading ? View.VISIBLE : View.GONE);
tvNoInternetAttachments.setVisibility(!suitable && downloading != null && downloading ? View.VISIBLE : View.GONE);
}
@Override