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

Use Replay instead of Publish #1105

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Mar 20, 2024

Part of #1091, supersedes #1103.

Uses Replay to replay the last value to all current and future subscribers.

@erri120 erri120 requested a review from Al12rs March 20, 2024 15:35
@erri120 erri120 self-assigned this Mar 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 54.20%. Comparing base (b3a60d6) to head (a70de95).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1105      +/-   ##
==========================================
- Coverage   54.22%   54.20%   -0.03%     
==========================================
  Files         671      671              
  Lines       22243    22257      +14     
  Branches     1709     1708       -1     
==========================================
+ Hits        12061    12064       +3     
- Misses       9789     9801      +12     
+ Partials      393      392       -1     
Flag Coverage Δ
Linux 53.52% <0.00%> (-0.03%) ⬇️
Windows 53.45% <0.00%> (+<0.01%) ⬆️
clean_environment_tests 54.18% <0.00%> (-0.02%) ⬇️
macOS 52.96% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...xusMods.DataModel/Diagnostics/DiagnosticManager.cs 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes

Copy link
Contributor

@Al12rs Al12rs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and it seems to be working as intended now.
Also like Replay rather than the broadcast solution from before.
Closing and reopening the app seems to cause weird reset of the workspace, but that is for a separate issue.

@Al12rs Al12rs mentioned this pull request Mar 21, 2024
14 tasks
@erri120
Copy link
Member Author

erri120 commented Mar 21, 2024

Also like Replay rather than the broadcast solution from before.

Not sure what you mean with "broadcast solution" but Replay is literally just Publish except instead of using a normal Subject<T> we use a ReplaySubject<T>.

@erri120 erri120 merged commit 8458a1c into Nexus-Mods:main Mar 21, 2024
5 checks passed
@erri120 erri120 deleted the fix/publish-stream-subscription branch March 21, 2024 08:59
@Al12rs
Copy link
Contributor

Al12rs commented Mar 21, 2024

I meant #1103 with Multicast

@erri120
Copy link
Member Author

erri120 commented Mar 21, 2024

I meant #1103 with Multicast

Replay and Publish are specialized versions of Multicast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants