Set seen/unseen button when downloading

This commit is contained in:
M66B 2020-03-06 07:45:30 +01:00
parent 103a52ff11
commit 4b077423fe
1 changed files with 10 additions and 10 deletions

View File

@ -1481,6 +1481,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvBody.setText(null);
grpDownloading.setVisibility(message.content ? View.GONE : View.VISIBLE);
ibSeen.setImageResource(message.ui_seen
? R.drawable.baseline_visibility_off_24 : R.drawable.baseline_visibility_24);
ibSeen.setContentDescription(context.getString(message.ui_seen
? R.string.title_unseen : R.string.title_seen));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibSeen.setTooltipText(context.getString(message.ui_seen
? R.string.title_unseen : R.string.title_seen));
ibSeen.setVisibility(message.folderReadOnly || message.uid == null
? View.GONE : View.VISIBLE);
if (!message.content)
return;
@ -1619,16 +1629,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
wvBody.setVisibility(View.GONE);
}
ibSeen.setImageResource(message.ui_seen
? R.drawable.baseline_visibility_off_24 : R.drawable.baseline_visibility_24);
ibSeen.setContentDescription(context.getString(message.ui_seen
? R.string.title_unseen : R.string.title_seen));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibSeen.setTooltipText(context.getString(message.ui_seen
? R.string.title_unseen : R.string.title_seen));
ibSeen.setVisibility(message.folderReadOnly || message.uid == null
? View.GONE : View.VISIBLE);
final Bundle args = new Bundle();
args.putSerializable("message", message);
args.putBoolean("show_full", show_full);