fix bugs with direct
This commit is contained in:
parent
512cc95ab4
commit
a4fbc0ca6a
2 changed files with 20 additions and 6 deletions
|
@ -127,21 +127,29 @@ class Group extends Channel{
|
|||
}
|
||||
async getHTML(){
|
||||
const id=++Channel.genid;
|
||||
if(this.localuser.channelfocus){
|
||||
this.localuser.channelfocus.infinite.delete();
|
||||
}
|
||||
if(this.guild!==this.localuser.lookingguild){
|
||||
this.guild.loadGuild();
|
||||
}
|
||||
this.guild.prevchannel=this;
|
||||
this.localuser.channelfocus=this;
|
||||
const prom=this.infinite.delete();
|
||||
history.pushState(null, "","/channels/"+this.guild_id+"/"+this.id);
|
||||
this.localuser.pageTitle("@"+this.name);
|
||||
(document.getElementById("channelTopic") as HTMLElement).setAttribute("hidden","");
|
||||
|
||||
const loading=document.getElementById("loadingdiv") as HTMLDivElement;
|
||||
Channel.regenLoadingMessages();
|
||||
loading.classList.add("loading");
|
||||
|
||||
await this.putmessages();
|
||||
await prom;
|
||||
if(id!==Channel.genid){
|
||||
return;
|
||||
}
|
||||
this.buildmessages();
|
||||
history.pushState(null, "","/channels/"+this.guild_id+"/"+this.id);
|
||||
this.localuser.pageTitle("@"+this.name);
|
||||
(document.getElementById("channelTopic") as HTMLElement).setAttribute("hidden","");
|
||||
(document.getElementById("typebox") as HTMLDivElement).contentEditable=""+true;
|
||||
}
|
||||
messageCreate(messagep:{d:messagejson}){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue