Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[webui] always reload the EPG store when the tab is activated
If we update the store when the tab is not activated the grid will be empty
once the tab is activated again. This fixes that plus fixes the issue where
the EPG data can be outdated if the web interface has been left open for a
long time and the active tab has been something other than the EPG tab.
  • Loading branch information
Jalle19 authored and perexg committed Aug 7, 2014
1 parent 848602d commit 6c8908c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/webui/static/app/epg.js
Expand Up @@ -296,14 +296,6 @@ tvheadend.epg = function() {
}])
});

/**
* Listener for DVR notifications. We want to update the EPG grid when a
* recording is finished/deleted etc. so the status icon gets updated.
*/
tvheadend.comet.on('dvrdb', function() {
epgStore.reload();
});

function setMetaAttr(meta, record) {
var now = new Date;
var start = record.get('start');
Expand Down Expand Up @@ -665,6 +657,11 @@ tvheadend.epg = function() {
});

panel.on('rowclick', rowclicked);

// Always reload the store when the tab is activated
panel.on('beforeshow', function() {
this.store.reload();
});

function rowclicked(grid, index) {
new tvheadend.epgDetails(grid.getStore().getAt(index).data);
Expand Down

0 comments on commit 6c8908c

Please sign in to comment.