Unread Channels support

Added support for unread channels, along with a few bug fixes
This commit is contained in:
MathMan05 2024-05-27 20:13:08 -05:00
parent 9676c605e7
commit f01c75d73c
5 changed files with 131 additions and 18 deletions

View file

@ -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();