Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
Jalle19 authored and perexg committed Aug 13, 2014
1 parent 5745e3e commit d8572f7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/webui/static/app/epg.js
Expand Up @@ -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();
Expand Down

0 comments on commit d8572f7

Please sign in to comment.