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

Susbscription dispose when undock the viewer parent container. #90

Open
danielmeza opened this issue Sep 7, 2022 · 1 comment
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@danielmeza
Copy link

danielmeza commented Sep 7, 2022

When the component is set on an Doking system like RadDocking on telerik, when the pane is undock from the main windows the log stop working, this is caused by the _Subscription disposition of the viewer.

I know that this is an expected behavior because we want to stop listen for new logs when the windows is closed, or unloaded, but the issue cause that the viewer dons't start to listen again whe the new windows set or even when the current windows loads again, and since the control dons't has any recovery strategy to start listen again, it fall in a useless state.

To solve this issue we should separete the log subscription login on two main public method:

StartListen();
This method should start listen the log by subscribing to the cache, and should be called in the current _OnLoaded even handler in order to keep the same functionality and start Listen as soon as the windows loads.

StopListen();

This method should stop the listen subscription for new logs as happen now in the _OnUnloaded event handler, and also should be called from the same hadler to keep the functionality.

Whit this 2 methods the user can start again to listen for new logs in such scenarios like the docking windows or any future scenario that require Start/Stop listen for logs.

Even the pause functionality could be promoted to use this method in order to improve performance.

I open this discussion, @dojo90 if you agree I could start a PR

@danielmeza danielmeza changed the title Susbscription dispe when undock the viewer parent container. Susbscription dispose when undock the viewer parent container. Sep 7, 2022
@djonasdev
Copy link
Owner

I think this is a special case that I have not yet considered or does not occur with me.

I appreciate it if you want to improve the code and start a PR. 😀💪

@djonasdev djonasdev added bug Something isn't working enhancement New feature or request labels Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants