Add message cache, to load missing threads for context.
ClosedPublic

Authored by dfaure on Mar 6 2020, 8:29 AM.

Details

Summary

When showing a message that is a reply to a thread, we want to show the
previous message in the thread as context. But if it's so old that it
wasn't loaded, we need to

  • load the thread replies, and if it's not in there
  • load the initial thread message

Both are async, so we connect to signals and update the view once the
message comes in.

Diff Detail

Repository
R865 Ruqola
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23357
Build 23375: arc lint + arc unit
dfaure requested review of this revision.Mar 6 2020, 8:29 AM
dfaure created this revision.
mlaurent requested changes to this revision.Mar 6 2020, 9:04 AM
mlaurent added inline comments.
src/core/messagecache.cpp
35

coding style
MessageCache...

: QObjec(...)
99

missing mMessageJobs.remove(messageId); ?

This revision now requires changes to proceed.Mar 6 2020, 9:04 AM
dfaure marked 2 inline comments as done.Mar 6 2020, 12:01 PM
dfaure added inline comments.
src/core/messagecache.cpp
99

Well spotted.

dfaure updated this revision to Diff 77090.Mar 6 2020, 12:03 PM
dfaure marked an inline comment as done.

Make requested changes + add unittest for messageForId

mlaurent accepted this revision.Mar 6 2020, 12:16 PM
This revision is now accepted and ready to land.Mar 6 2020, 12:16 PM
dfaure closed this revision.Mar 6 2020, 12:18 PM