bug fixes
This commit is contained in:
parent
cd15064d3a
commit
9e830ae520
6 changed files with 34 additions and 4 deletions
|
@ -355,13 +355,16 @@ class Channel extends SnowFlake{
|
|||
}
|
||||
static dragged:[Channel,HTMLDivElement]|[]=[];
|
||||
html:WeakRef<HTMLElement>|undefined;
|
||||
get visable(){
|
||||
return this.hasPermission("VIEW_CHANNEL")
|
||||
}
|
||||
createguildHTML(admin=false):HTMLDivElement{
|
||||
const div=document.createElement("div");
|
||||
this.html=new WeakRef(div);
|
||||
if(!this.hasPermission("VIEW_CHANNEL")){
|
||||
if(!this.visable){
|
||||
let quit=true;
|
||||
for(const thing of this.children){
|
||||
if(thing.hasPermission("VIEW_CHANNEL")){
|
||||
if(thing.visable){
|
||||
quit=false;
|
||||
}
|
||||
}
|
||||
|
@ -662,6 +665,7 @@ class Channel extends SnowFlake{
|
|||
const id=++Channel.genid;
|
||||
if(this.localuser.channelfocus){
|
||||
this.localuser.channelfocus.infinite.delete();
|
||||
this.localuser.channelfocus=this;
|
||||
}
|
||||
if(this.guild!==this.localuser.lookingguild){
|
||||
this.guild.loadGuild();
|
||||
|
@ -927,6 +931,9 @@ class Channel extends SnowFlake{
|
|||
}else if(removetitle){
|
||||
removetitle.remove();
|
||||
}
|
||||
if(this.localuser.channelfocus!==this){
|
||||
return;
|
||||
}
|
||||
messages.append(await this.infinite.getDiv(id));
|
||||
this.infinite.updatestuff();
|
||||
this.infinite.watchForChange().then(async _=>{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue