Implemented cache clearing in channel list
This commit is contained in:
@@ -172,6 +172,16 @@ class ChannelList {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear program info cache
|
||||||
|
* Useful when EPG data has been updated
|
||||||
|
*/
|
||||||
|
clearProgramInfoCache() {
|
||||||
|
if (this._programInfoCache) {
|
||||||
|
this._programInfoCache.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
escapeHtml(text) {
|
escapeHtml(text) {
|
||||||
if (!text) return '';
|
if (!text) return '';
|
||||||
return text
|
return text
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ class HomePage {
|
|||||||
// Silently fetch EPG data for sidebar info
|
// Silently fetch EPG data for sidebar info
|
||||||
try {
|
try {
|
||||||
await this.app.epgGuide.fetchEpgData();
|
await this.app.epgGuide.fetchEpgData();
|
||||||
|
|
||||||
|
// Clear cache so we don't get stale "null" results from initial render
|
||||||
|
this.app.channelList.clearProgramInfoCache();
|
||||||
|
|
||||||
// Update program info in existing DOM elements without re-rendering
|
// Update program info in existing DOM elements without re-rendering
|
||||||
this.updateProgramInfo();
|
this.updateProgramInfo();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user