From 074cc5869def8b91f1799af862b075579593cb60 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Thu, 10 Mar 2011 09:06:13 -0800 Subject: [PATCH] Update attachment buttons after loading attachment We would update the attachment buttons if the UI was becoming visible (i.e. coming back from a settings page), but, we weren't updating them after the attachment finished loading. bug 4074694 Change-Id: I9d235620b5a92c2bbb871f70c9d97350cc151ce8 --- .../email/activity/MessageViewFragmentBase.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java index dab13f64e..ce06f2c2c 100644 --- a/src/com/android/email/activity/MessageViewFragmentBase.java +++ b/src/com/android/email/activity/MessageViewFragmentBase.java @@ -183,7 +183,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O /** * Flags to control the tabs. - * @see #updateTabFlags(int) + * @see #updateTabs(int) */ private int mTabFlags; @@ -857,14 +857,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O MessageViewAttachmentInfo info = findAttachmentInfo(attachmentId); if (info != null) { info.loaded = true; - - info.loadButton.setVisibility(View.GONE); - info.cancelButton.setVisibility(View.GONE); - - boolean showSave = info.mAllowSave && !TextUtils.isEmpty(info.mName); - boolean showView = info.mAllowView; - info.saveButton.setVisibility(showSave ? View.VISIBLE : View.GONE); - info.openButton.setVisibility(showView ? View.VISIBLE : View.GONE); + updateAttachmentButtons(info); } }