Unread Channels support
Added support for unread channels, along with a few bug fixes
This commit is contained in:
parent
9676c605e7
commit
f01c75d73c
5 changed files with 131 additions and 18 deletions
|
@ -95,6 +95,27 @@ class guild{
|
|||
sortchannels(){
|
||||
this.headchannels.sort((a,b)=>{return a.position-b.position;});
|
||||
}
|
||||
unreads(html){
|
||||
if(html){
|
||||
this.html=html;
|
||||
}else{
|
||||
html=this.html;
|
||||
}
|
||||
let read=true;
|
||||
for(const thing of this.channels){
|
||||
if(thing.hasunreads){
|
||||
console.log(thing)
|
||||
read=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
console.log(read);
|
||||
if(read){
|
||||
html.children[0].classList.remove("notiunread");
|
||||
}else{
|
||||
html.children[0].classList.add("notiunread");
|
||||
}
|
||||
}
|
||||
getHTML(){
|
||||
//this.printServers();
|
||||
this.sortchannels();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue