Don't show "Stop" for loaded attachments

There's a case where we show both the "stop" and "view" buttons at the same
time.

Bug 3138021

Change-Id: Ib12f5dc1e522a04b1cc175626d084ed8bc5c8065
This commit is contained in:
Makoto Onuki 2011-01-10 16:24:46 -08:00
parent 84c4ec4aef
commit 5fed5c8a59

View File

@ -736,7 +736,10 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
}
@Override
protected void onPostExecute(Void result) {
if (attachment.cancelButton.getVisibility() != View.VISIBLE) {
// If the load buttons is shown, it's already loaded -- don't show the stop
// button.
if (attachment.cancelButton.getVisibility() != View.VISIBLE
&& attachment.loadButton.getVisibility() != View.VISIBLE) {
attachment.cancelButton.setVisibility(View.VISIBLE);
}
}