Skip to content
Snippets Groups Projects
Unverified Commit d245e1dd authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix race condition where one envelope object overwrites the other


On page load we have a lot of concurrent operations going on. This
includes:

1) Loading the list of envelopes
2) Loading the contents of the thread

Both of these might fetch the envelope/thread to be shown. Now, there is
some more logic going on that stores the thread of an envelope.

In the unlucky case, things followed this pattern

1) The envelope is fetched
2) The thread list is fetched and stored to the envelope
3) The envelope list is fetched and the envelope is added again,
   overwriting the other one
4) The thread list was thus empty -> the current message thread vanished

If the envelope is already known, it will be re-used. Thus this won't
happen on later navigation but just right after the page load.

Signed-off-by: default avatarChristoph Wurst <christoph@winzerhof-wurst.at>
parent 9bc6e8bd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment