-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(display): add display service and put display content in the bus…
… via `DisplayRenderEvent`
- Loading branch information
Showing
19 changed files
with
225 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/integration/results/test_services/all_services_register/window-desktop-000.hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// window-desktop-000 | ||
12cac7ceb6198b823530c73a9965c46a793f38eccb63aa77d51490cf8c9b72e5 | ||
3620d71f464832b8c78da353873df66e3f2daf54a324150709b4e8190b6dbafb |
2 changes: 1 addition & 1 deletion
2
tests/integration/results/test_services/all_services_register/window-rpi-000.hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// window-rpi-000 | ||
b64fc25d16a3142afc786cd59c2700fc0b0abbb85ed8ea209e3faaff64c73713 | ||
006d4f47428eb62a54e3111ed4ffae84fbf14a4baff55a93a213475f7457a13b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
ALL_SERVICES_IDS = [ | ||
'audio', | ||
'camera', | ||
'display', | ||
'docker', | ||
'ethernet', | ||
'ip', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ruff: noqa: D100, D101, D102, D103, D104, D107, N999 | ||
from __future__ import annotations | ||
|
||
from dataclasses import replace | ||
|
||
from redux import ( | ||
InitAction, | ||
InitializationActionError, | ||
) | ||
|
||
from ubo_app.store.services.display import ( | ||
DisplayAction, | ||
DisplayPauseAction, | ||
DisplayResumeAction, | ||
DisplayState, | ||
) | ||
|
||
Action = InitAction | DisplayAction | ||
|
||
|
||
def reducer( | ||
state: DisplayState | None, | ||
action: Action, | ||
) -> DisplayState: | ||
if state is None: | ||
if isinstance(action, InitAction): | ||
return DisplayState() | ||
raise InitializationActionError(action) | ||
|
||
if isinstance(action, DisplayPauseAction): | ||
return replace(state, is_paused=True) | ||
|
||
if isinstance(action, DisplayResumeAction): | ||
return replace(state, is_paused=False) | ||
|
||
return state |
Oops, something went wrong.