Closed CharlesChong closed 10 years ago
Have you tried require('views').reload();
? I guess this does not reload the builder though.
so it turns out require('views').reload();
works to refresh queue position, but causes a page flicker. I'm going to use it for now though.
Bonus points if you can open the chrome dev tools to the Timeline tab and debug why there's a flicker.
I'm not very good at using the Timeline tab, but from what I can tell, the .reload() requires an XHR load to game list to retrieve the new game queue positions, which takes some time in addition to rerendering the page.
Sounds like you need to lean on the caching framework, which you've turned off. Which sounds like a bad idea.
But that aside, this isn't something that's user-facing so it really doesn't matter.
Would caching work? The main reason why I refresh the data is because a game disable or deletion can result in different queue positions, which I need to retrieve from the database.
In that case, the server should respond to the action with the updated queue position and you should then use that data to perform cache rewriting.
I'm not sure how to do that. I'm going to merge this in for now.
See issue #99
Changes:
Issues:
Queue position does not update when a game is deleted or disabled. Is there a way to reload the page builder? Or should I manually go through and get the queue positions?developer_dashboard.js
line#72 when it should really match thestatusName
filter fromhelpers.js
. How would I call this function? I can't seem to figure that out.r?