initial load messages
parent
5e6ce1a210
commit
767c040634
|
@ -49,7 +49,6 @@ function addThread(thread) {
|
|||
btn.onclick = () => {
|
||||
chooseThread(thread);
|
||||
loadMessages();
|
||||
document.getElementById("loadmore").classList.remove("hidden");
|
||||
if (!thread.permissions.post) {
|
||||
document.getElementById("msginput").classList.add("hidden");
|
||||
} else {
|
||||
|
@ -154,7 +153,10 @@ window.onload = () => {
|
|||
document.getElementById("messages").prepend(el);
|
||||
}
|
||||
}
|
||||
if (!msg.more) document.getElementById("loadmore").classList.add("hidden");
|
||||
if (!msg.more)
|
||||
document.getElementById("loadmore").classList.add("hidden");
|
||||
else
|
||||
document.getElementById("loadmore").classList.remove("hidden");
|
||||
});
|
||||
window.socket.on("authenticate", (msg) => {
|
||||
if (msg.success) {
|
||||
|
@ -175,6 +177,7 @@ window.onload = () => {
|
|||
else return emitter.call(window.socket, type);
|
||||
};
|
||||
window.socket.emit("list_threads", {});
|
||||
loadMessages();
|
||||
} else {
|
||||
document.getElementById("register").classList.remove("hidden");
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue