display channel topic

This commit is contained in:
TomatoCake
2024-08-18 07:50:06 +02:00
parent 302341bb99
commit 5d2d0267f9
4 changed files with 17 additions and 4 deletions

View File

@@ -628,7 +628,13 @@ class Channel{
this.localuser.channelfocus=this;
const prom=this.infinite.delete();
history.pushState(null, null,"/channels/"+this.guild_id+"/"+this.snowflake);
document.getElementById("channelname").textContent="#"+this.name;
if (this.topic) {
document.getElementById("channelTopic").textContent=this.topic;
document.getElementById("channelTopic").removeAttribute("hidden");
} else document.getElementById("channelTopic").setAttribute("hidden","");
const loading=document.getElementById("loadingdiv");
Channel.regenLoadingMessages();
loading.classList.add("loading");