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

fix(messagecache): Load message contents whenever we encounter them #1513

Merged

Conversation

castaway
Copy link
Contributor

@castaway castaway commented Dec 7, 2023

There are many sentry-errors resulting from the message list drawing code attempting to fetch the message contents from the cache, when the cache hasnt been created or updated yet (that happens after the canvas has been painted with the message list)

This fills the cache as we look for the data (using promises so without interrupting the canvas drawing)

@castaway
Copy link
Contributor Author

Notes for reviewers:

The messageCache contains the actual message contents, generated / filled when getMessageContents is called. We don't need this data for the message list (unless summaries are on!), however we attempt to fill the message content slot every time we fetch the message data in general.

Before this update we were fetching from cachedMessageContents in getDocData, before the cache had been filled, so there was a lot of "this cache contains null". Instead I have made it call the full getMessageContents (aka updateMessageText), which is also what we call after the canvas has been painted

@castaway castaway merged commit 8a5f5fb into runbox:master Dec 14, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants