Skip to content

Commit

Permalink
Add clear items counter in feed for broadcast channel
Browse files Browse the repository at this point in the history
  • Loading branch information
On1x committed Jul 7, 2023
1 parent 66f1c11 commit 0287abc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4833,6 +4833,10 @@ function load_new_objects(indicator){
//reset feed counter
$('.counter-feed').removeClass('show');
$('.counter-feed').html('0');
if(typeof bc === 'object'){
//send to others tabs about cleared items counter in feed
bc.postMessage({type:'feed_count',pid:pid,count:0});
}

for(let i in new_objects){
let object=new_objects[i];
Expand Down Expand Up @@ -11144,6 +11148,10 @@ function view_path(location,state,save_state,update){
view.find('.objects').html(ltmp(ltmp_arr.new_objects+ltmp_arr.feed_loader_notice,{time:0}));
$('.counter-feed').removeClass('show');
$('.counter-feed').html('0');
if(typeof bc === 'object'){
//send to others tabs about cleared items counter in feed
bc.postMessage({type:'feed_count',pid:pid,count:0});
}
}
path='viz://';
level=0;
Expand Down

0 comments on commit 0287abc

Please sign in to comment.