1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 21:22:26 -05:00

finish removing setHeaders as a layer of indirection

This commit is contained in:
Jesse Vincent 2010-12-28 09:09:15 +00:00
parent 8116a0f39f
commit 9fe56831bf

View File

@ -499,6 +499,11 @@ public class MessageView extends K9Activity implements OnClickListener
} }
} }
}); });
if (mAdditionalHeadersView.getVisibility() == View.VISIBLE)
{
showAdditionalHeaders();
}
} }
public void networkError() public void networkError()
@ -1373,7 +1378,7 @@ public class MessageView extends K9Activity implements OnClickListener
try try
{ {
mMessage.setFlag(Flag.FLAGGED, !mMessage.isSet(Flag.FLAGGED)); mMessage.setFlag(Flag.FLAGGED, !mMessage.isSet(Flag.FLAGGED));
setHeaders(mMessage.getFolder().getName(), mMessage.getUid(), mMessage); mHandler.setHeaders( mMessage);
prepareMenuItems(); prepareMenuItems();
} }
catch (MessagingException me) catch (MessagingException me)
@ -1560,7 +1565,7 @@ public class MessageView extends K9Activity implements OnClickListener
try try
{ {
mMessage.setFlag(Flag.SEEN, false); mMessage.setFlag(Flag.SEEN, false);
setHeaders(mMessage.getFolder().getName(), mMessage.getUid(), mMessage); mHandler.setHeaders(mMessage);
} }
catch (Exception e) catch (Exception e)
{ {
@ -1935,17 +1940,6 @@ public class MessageView extends K9Activity implements OnClickListener
} }
} }
private void setHeaders(String folder, String uid,
final Message message) throws MessagingException
{
mHandler.setHeaders(message);
// Update additional headers display, if visible
if (mAdditionalHeadersView.getVisibility() == View.VISIBLE)
{
mHandler.showAdditionalHeaders();
}
}
class Listener extends MessagingListener class Listener extends MessagingListener
{ {
@Override @Override
@ -1972,7 +1966,7 @@ public class MessageView extends K9Activity implements OnClickListener
} }
try try
{ {
setHeaders(folder, uid, message); mHandler.setHeaders(message);
mHandler.showHeaderContainer(); mHandler.showHeaderContainer();
} }
catch (MessagingException me) catch (MessagingException me)
@ -1996,7 +1990,7 @@ public class MessageView extends K9Activity implements OnClickListener
&& MessageView.this.mMessage.isSet(Flag.X_DOWNLOADED_PARTIAL) && MessageView.this.mMessage.isSet(Flag.X_DOWNLOADED_PARTIAL)
&& message.isSet(Flag.X_DOWNLOADED_FULL)) && message.isSet(Flag.X_DOWNLOADED_FULL))
{ {
setHeaders(folder, uid, message); mHandler.setHeaders(message);
mHandler.showHeaderContainer(); mHandler.showHeaderContainer();
} }
MessageView.this.mMessage = message; MessageView.this.mMessage = message;