Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchInlineImages should be split into multiple tasks. #119

Open
tdresser opened this issue Jun 17, 2019 · 0 comments
Open

fetchInlineImages should be split into multiple tasks. #119

tdresser opened this issue Jun 17, 2019 · 0 comments

Comments

@tdresser
Copy link
Collaborator

async fetchInlineImages_(attachments: ImageAttachmentData[]) {
for (let attachmentData of attachments) {
let fetched = await gapi.client.gmail.users.messages.attachments.get({
'id': attachmentData.attachment.id,
'messageId': this.id,
'userId': USER_ID,
});
let data = Message.base64_.decode(fetched.result.data || '');
attachmentData.image.src =
data:${attachmentData.attachment.contentType},${data};
}
}

Ojan: I would expect a real yield when making that gapi call. Maybe this is microtasks doing something terrible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant