|
@ -105,6 +105,7 @@ public class FragmentMessage extends FragmentEx { |
|
|
private Group grpHeader; |
|
|
private Group grpHeader; |
|
|
private Group grpAddresses; |
|
|
private Group grpAddresses; |
|
|
private Group grpAttachments; |
|
|
private Group grpAttachments; |
|
|
|
|
|
private Group grpError; |
|
|
private Group grpMessage; |
|
|
private Group grpMessage; |
|
|
|
|
|
|
|
|
private TupleMessageEx message = null; |
|
|
private TupleMessageEx message = null; |
|
@ -148,6 +149,7 @@ public class FragmentMessage extends FragmentEx { |
|
|
grpHeader = view.findViewById(R.id.grpHeader); |
|
|
grpHeader = view.findViewById(R.id.grpHeader); |
|
|
grpAddresses = view.findViewById(R.id.grpAddresses); |
|
|
grpAddresses = view.findViewById(R.id.grpAddresses); |
|
|
grpAttachments = view.findViewById(R.id.grpAttachments); |
|
|
grpAttachments = view.findViewById(R.id.grpAttachments); |
|
|
|
|
|
grpError = view.findViewById(R.id.grpError); |
|
|
grpMessage = view.findViewById(R.id.grpMessage); |
|
|
grpMessage = view.findViewById(R.id.grpMessage); |
|
|
|
|
|
|
|
|
setHasOptionsMenu(true); |
|
|
setHasOptionsMenu(true); |
|
@ -219,11 +221,11 @@ public class FragmentMessage extends FragmentEx { |
|
|
tvCount.setVisibility(View.GONE); |
|
|
tvCount.setVisibility(View.GONE); |
|
|
grpAddresses.setVisibility(View.GONE); |
|
|
grpAddresses.setVisibility(View.GONE); |
|
|
grpAttachments.setVisibility(View.GONE); |
|
|
grpAttachments.setVisibility(View.GONE); |
|
|
tvError.setVisibility(View.GONE); |
|
|
|
|
|
|
|
|
grpError.setVisibility(View.GONE); |
|
|
|
|
|
|
|
|
tvCount.setTag(tvCount.getVisibility()); |
|
|
tvCount.setTag(tvCount.getVisibility()); |
|
|
tvCc.setTag(grpAddresses.getVisibility()); |
|
|
tvCc.setTag(grpAddresses.getVisibility()); |
|
|
tvError.setTag(tvError.getVisibility()); |
|
|
|
|
|
|
|
|
tvError.setTag(grpError.getVisibility()); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -243,7 +245,7 @@ public class FragmentMessage extends FragmentEx { |
|
|
tvCount.setVisibility((int) tvCount.getTag()); |
|
|
tvCount.setVisibility((int) tvCount.getTag()); |
|
|
grpAddresses.setVisibility((int) tvCc.getTag()); |
|
|
grpAddresses.setVisibility((int) tvCc.getTag()); |
|
|
grpAttachments.setVisibility(adapter != null && adapter.getItemCount() > 0 ? View.VISIBLE : View.GONE); |
|
|
grpAttachments.setVisibility(adapter != null && adapter.getItemCount() > 0 ? View.VISIBLE : View.GONE); |
|
|
tvError.setVisibility((int) tvError.getTag()); |
|
|
|
|
|
|
|
|
grpError.setVisibility((int) tvError.getTag()); |
|
|
|
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
@ -284,7 +286,7 @@ public class FragmentMessage extends FragmentEx { |
|
|
pbBody.setVisibility(View.GONE); |
|
|
pbBody.setVisibility(View.GONE); |
|
|
bottom_navigation.setVisibility(View.GONE); |
|
|
bottom_navigation.setVisibility(View.GONE); |
|
|
tvCount.setVisibility(View.GONE); |
|
|
tvCount.setVisibility(View.GONE); |
|
|
tvError.setVisibility(View.GONE); |
|
|
|
|
|
|
|
|
grpError.setVisibility(View.GONE); |
|
|
fab.setVisibility(View.GONE); |
|
|
fab.setVisibility(View.GONE); |
|
|
pbWait.setVisibility(View.VISIBLE); |
|
|
pbWait.setVisibility(View.VISIBLE); |
|
|
|
|
|
|
|
@ -474,10 +476,10 @@ public class FragmentMessage extends FragmentEx { |
|
|
if (free) { |
|
|
if (free) { |
|
|
tvCount.setVisibility((int) tvCount.getTag()); |
|
|
tvCount.setVisibility((int) tvCount.getTag()); |
|
|
grpAddresses.setVisibility((int) tvCc.getTag()); |
|
|
grpAddresses.setVisibility((int) tvCc.getTag()); |
|
|
tvError.setVisibility((int) tvError.getTag()); |
|
|
|
|
|
|
|
|
grpError.setVisibility((int) tvError.getTag()); |
|
|
} else { |
|
|
} else { |
|
|
tvCount.setVisibility(!free && message.count > 1 ? View.VISIBLE : View.GONE); |
|
|
tvCount.setVisibility(!free && message.count > 1 ? View.VISIBLE : View.GONE); |
|
|
tvError.setVisibility(free || message.error == null ? View.GONE : View.VISIBLE); |
|
|
|
|
|
|
|
|
grpError.setVisibility(free || message.error == null ? View.GONE : View.VISIBLE); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Observe attachments |
|
|
// Observe attachments |
|
|