fixes zkill stream for systems with no recent kills

This commit is contained in:
soneill
2020-09-01 00:57:35 +12:00
parent af4a3068f1
commit 6b85d31d38
2 changed files with 36 additions and 0 deletions

View File

@@ -576,6 +576,24 @@ define([
* @param killmailData
*/
onWsMessage(zkbData, killmailData){
if(!this._killboardEl){
// Remove label which indicates that there are no kills
let noKillsEl = this._bodyEl.querySelector('.label-success');
if(noKillsEl){
this._bodyEl.removeChild(noKillsEl);
}
// Initialize necessary container nodes
this._killboardEl = document.createElement('ul');
this._killboardEl.classList.add(this._config.systemKillboardListClass);
this._bodyEl.append(
this._killboardLabelEl,
this._killboardEl
);
}
// check if killmail belongs to current filtered "streams"
if(this.filterKillmailByStreams(killmailData)){
// check max limit for WS kill entries

View File

@@ -576,6 +576,24 @@ define([
* @param killmailData
*/
onWsMessage(zkbData, killmailData){
if(!this._killboardEl){
// Remove label which indicates that there are no kills
let noKillsEl = this._bodyEl.querySelector('.label-success');
if(noKillsEl){
this._bodyEl.removeChild(noKillsEl);
}
// Initialize necessary container nodes
this._killboardEl = document.createElement('ul');
this._killboardEl.classList.add(this._config.systemKillboardListClass);
this._bodyEl.append(
this._killboardLabelEl,
this._killboardEl
);
}
// check if killmail belongs to current filtered "streams"
if(this.filterKillmailByStreams(killmailData)){
// check max limit for WS kill entries