Refresh image preview when attachment has been downloaded
This commit is contained in:
parent
ae0606b5dc
commit
084396c369
3 changed files with 10 additions and 1 deletions
|
@ -68,6 +68,7 @@ public class AttachmentController {
|
|||
downloadAttachment(localPart, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
messageViewFragment.refreshAttachmentThumbnail(attachment);
|
||||
viewLocalAttachment();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,6 +22,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.fsck.k9.Account;
|
||||
import com.fsck.k9.Account.ShowPictures;
|
||||
import com.fsck.k9.mailstore.AttachmentViewInfo;
|
||||
import com.fsck.k9.ui.R;
|
||||
import com.fsck.k9.helper.Contacts;
|
||||
import com.fsck.k9.mail.Address;
|
||||
|
@ -356,6 +357,13 @@ public class MessageTopView extends LinearLayout {
|
|||
showPicturesButtonClicked = savedState.showPicturesButtonClicked;
|
||||
}
|
||||
|
||||
public void refreshAttachmentThumbnail(AttachmentViewInfo attachment) {
|
||||
View messageContainerViewCandidate = containerView.getChildAt(0);
|
||||
if (messageContainerViewCandidate instanceof MessageContainerView) {
|
||||
((MessageContainerView) messageContainerViewCandidate).refreshAttachmentThumbnail(attachment);
|
||||
}
|
||||
}
|
||||
|
||||
private static class SavedState extends BaseSavedState {
|
||||
boolean showPicturesButtonClicked;
|
||||
|
||||
|
|
|
@ -660,7 +660,7 @@ public class MessageViewFragment extends Fragment implements ConfirmationDialogF
|
|||
}
|
||||
|
||||
public void refreshAttachmentThumbnail(AttachmentViewInfo attachment) {
|
||||
// mMessageView.refreshAttachmentThumbnail(attachment);
|
||||
mMessageView.refreshAttachmentThumbnail(attachment);
|
||||
}
|
||||
|
||||
private MessageCryptoMvpView messageCryptoMvpView = new MessageCryptoMvpView() {
|
||||
|
|
Loading…
Reference in a new issue