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

Updating queue and sample list on observers when it changes (As redux persist was removed) #1090

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

marcus-oscarsson
Copy link
Member

We have removed redux-persist which means that updates to the queue needs to be communicated to the observers.

} else if (record.Signal === 'update') {
const state = store.getState();
if (!state.login.user.inControl) {
this.dispatch(fetchQueue());
Copy link
Contributor

Choose a reason for hiding this comment

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

why not sending the queue with the emit? feels awkward to notify the UI about an update, but let the UI itself fetch the newest data

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking the same, but then I thought that it would be better to do it the same way all the time, meaning that we always fetch the queue via a http request, and we reuse the route we have in place, otherwise its like we are getting the queue in two different ways. If it makes sense

Copy link
Contributor

Choose a reason for hiding this comment

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

ah yes, you have a point there

Copy link
Contributor

@meguiraun meguiraun left a comment

Choose a reason for hiding this comment

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

thanks

@marcus-oscarsson
Copy link
Member Author

:)

@marcus-oscarsson marcus-oscarsson merged commit ec513cc into develop Oct 10, 2023
@marcus-oscarsson marcus-oscarsson deleted the mo-observer-update branch October 10, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants