fix side pannel for dirrect messages
This commit is contained in:
parent
a1902a912f
commit
c23f6a94a8
3 changed files with 10 additions and 3 deletions
|
@ -188,6 +188,7 @@ class Group extends Channel{
|
||||||
this.rendertyping();
|
this.rendertyping();
|
||||||
await this.putmessages();
|
await this.putmessages();
|
||||||
await prom;
|
await prom;
|
||||||
|
this.localuser.getSidePannel();
|
||||||
if(id !== Channel.genid){
|
if(id !== Channel.genid){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexttb" id="sideDiv">
|
<div class="flexttb" id="sideDiv"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -526,9 +526,10 @@ class Localuser{
|
||||||
}
|
}
|
||||||
return channel; // Add this line to return the 'channel' variable
|
return channel; // Add this line to return the 'channel' variable
|
||||||
}
|
}
|
||||||
async memberListUpdate(list:memberlistupdatejson){
|
async memberListUpdate(list:memberlistupdatejson|void){
|
||||||
const div=document.getElementById("sideDiv") as HTMLDivElement;
|
const div=document.getElementById("sideDiv") as HTMLDivElement;
|
||||||
div.innerHTML="";
|
div.innerHTML="";
|
||||||
|
if(!list) return;
|
||||||
const counts=new Map<string,number>();
|
const counts=new Map<string,number>();
|
||||||
const guild=this.lookingguild;
|
const guild=this.lookingguild;
|
||||||
if(!guild) return;
|
if(!guild) return;
|
||||||
|
@ -616,7 +617,13 @@ class Localuser{
|
||||||
console.log(elms);
|
console.log(elms);
|
||||||
}
|
}
|
||||||
async getSidePannel(){
|
async getSidePannel(){
|
||||||
|
|
||||||
if(this.ws&&this.channelfocus){
|
if(this.ws&&this.channelfocus){
|
||||||
|
console.log(this.channelfocus.guild.id);
|
||||||
|
if(this.channelfocus.guild.id==="@me"){
|
||||||
|
this.memberListUpdate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.ws.send(JSON.stringify({
|
this.ws.send(JSON.stringify({
|
||||||
d:{
|
d:{
|
||||||
channels:{[this.channelfocus.id]:[[0,99]]},
|
channels:{[this.channelfocus.id]:[[0,99]]},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue