Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5ccd9a01 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Fix race condition in screenshot code with multiple displays

DisplayRepository.displays flow was initialized as an empty set at first when converted to a StateFlow.
Now it is a SharedFlow without any initial values: consumers of the flow will have to wait to get the first value.
As the replay number is equal to 1 and onStart emits an event, everyone collecting the flow will have something immediately and not starve.

Fixes: 306680094
Test: TakeScreenshotExecutorTest, DisplayRepositoryTest
Change-Id: I6ac7f3d6aa31f7f3fff4a5691a51bf8db33021df
parent 57cb73f2
Loading
Loading
Loading
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