1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Only show the "Cc" lines in message view if there's a Cc.

This commit is contained in:
Jesse Vincent 2010-04-26 15:23:57 +00:00
parent 0e4028d458
commit ac36016b86

View File

@ -60,6 +60,7 @@ public class MessageView extends K9Activity implements OnClickListener
private int defaultSubjectColor; private int defaultSubjectColor;
private WebView mMessageContentView; private WebView mMessageContentView;
private LinearLayout mAttachments; private LinearLayout mAttachments;
private LinearLayout mCcContainerView;
private View mAttachmentIcon; private View mAttachmentIcon;
private View mDownloadingIcon; private View mDownloadingIcon;
private View mShowPicturesSection; private View mShowPicturesSection;
@ -277,6 +278,9 @@ public class MessageView extends K9Activity implements OnClickListener
} }
mTimeView.setText(time); mTimeView.setText(time);
mToView.setText(to); mToView.setText(to);
mCcContainerView.setVisibility((cc != null && cc.length() > 0 )? View.VISIBLE : View.GONE);
mCcView.setText(cc); mCcView.setText(cc);
mAttachmentIcon.setVisibility(hasAttachments ? View.VISIBLE : View.GONE); mAttachmentIcon.setVisibility(hasAttachments ? View.VISIBLE : View.GONE);
mDownloadingIcon.setVisibility(isDownloading ? View.VISIBLE : View.GONE); mDownloadingIcon.setVisibility(isDownloading ? View.VISIBLE : View.GONE);
@ -444,6 +448,7 @@ public class MessageView extends K9Activity implements OnClickListener
mFromView = (TextView)findViewById(R.id.from); mFromView = (TextView)findViewById(R.id.from);
mToView = (TextView)findViewById(R.id.to); mToView = (TextView)findViewById(R.id.to);
mCcView = (TextView)findViewById(R.id.cc); mCcView = (TextView)findViewById(R.id.cc);
mCcContainerView = (LinearLayout)findViewById(R.id.cc_container);
mSubjectView = (TextView)findViewById(R.id.subject); mSubjectView = (TextView)findViewById(R.id.subject);
defaultSubjectColor = mSubjectView.getCurrentTextColor(); defaultSubjectColor = mSubjectView.getCurrentTextColor();