[webui] fix status icon updates when a recording is scheduled/started from the

EPG grid

We can listen on dvrdb comet updates but we should only act on them when the
EPG grid is visible. When it's not visible the update is delayed until the
tab becomes visible again.
This commit is contained in:
Sam Stenvall 2014-08-13 10:36:30 +03:00 committed by Jaroslav Kysela
parent 5745e3e0d4
commit d8572f7740

View file

@ -658,6 +658,17 @@ tvheadend.epg = function() {
panel.on('rowclick', rowclicked);
/**
* Listener for DVR notifications. We want to update the EPG grid when a
* recording is finished/deleted etc. so the status icon gets updated.
* Only do this when the tab is visible, otherwise it won't work as
* expected.
*/
tvheadend.comet.on('dvrdb', function() {
if (panel.isVisible())
epgStore.reload();
});
// Always reload the store when the tab is activated
panel.on('beforeshow', function() {
this.store.reload();