Get rid of exesive logging
This commit is contained in:
parent
3952698d31
commit
0a1b574f2a
12 changed files with 0 additions and 32 deletions
|
@ -265,7 +265,6 @@ class Channel {
|
|||
if (!this.hasPermission("VIEW_CHANNEL")) {
|
||||
return false;
|
||||
}
|
||||
console.log(this.lastmessageid, !!this.lastmessageid, ":3");
|
||||
return this.lastmessageid !== this.lastreadmessageid && this.type !== 4 && !!this.lastmessageid;
|
||||
}
|
||||
hasPermission(name, member = this.guild.member) {
|
||||
|
@ -895,7 +894,6 @@ class Channel {
|
|||
return id;
|
||||
}
|
||||
findClosest(snowflake) {
|
||||
console.log("in here :3");
|
||||
if (!this.lastmessage)
|
||||
return;
|
||||
let flake = this.lastmessage.snowflake;
|
||||
|
@ -903,7 +901,6 @@ class Channel {
|
|||
return;
|
||||
}
|
||||
;
|
||||
console.log("in here :3");
|
||||
const time = snowflake.getUnixTime();
|
||||
let flaketime = flake.getUnixTime();
|
||||
while (flake && time < flaketime) {
|
||||
|
@ -1018,7 +1015,6 @@ class Channel {
|
|||
}
|
||||
const messagez = new Message(messagep.d, this);
|
||||
this.lastmessage = messagez;
|
||||
console.log(this.lastmessageid, messagez.snowflake, ":3");
|
||||
if (this.lastmessageid) {
|
||||
this.idToNext.set(this.lastmessageid, messagez.snowflake);
|
||||
this.idToPrev.set(messagez.snowflake, this.lastmessageid);
|
||||
|
|
|
@ -111,10 +111,8 @@ class Emoji {
|
|||
title.textContent = Emoji.emojis[0].name;
|
||||
title.classList.add("emojiTitle");
|
||||
menu.append(title);
|
||||
console.log("menu :3");
|
||||
const selection = document.createElement("div");
|
||||
selection.classList.add("flexltr", "dontshrink", "emojirow");
|
||||
console.log("menu :3");
|
||||
const body = document.createElement("div");
|
||||
body.classList.add("emojiBody");
|
||||
let isFirst = true;
|
||||
|
@ -196,7 +194,6 @@ class Emoji {
|
|||
}
|
||||
menu.append(selection);
|
||||
menu.append(body);
|
||||
console.log("menu :3");
|
||||
return promise;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,6 @@ class Guild {
|
|||
this.headchannels = [];
|
||||
for (const thing of this.channels) {
|
||||
const parent = thing.resolveparent(this);
|
||||
console.log(parent, ":3");
|
||||
if (!parent) {
|
||||
this.headchannels.push(thing);
|
||||
}
|
||||
|
@ -359,13 +358,11 @@ class Guild {
|
|||
}
|
||||
}
|
||||
getHTML() {
|
||||
console.log("found :3", this.headchannels);
|
||||
//this.printServers();
|
||||
this.sortchannels();
|
||||
this.printServers();
|
||||
const build = document.createElement("div");
|
||||
for (const thing of this.headchannels) {
|
||||
console.log("found :3");
|
||||
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
||||
}
|
||||
return build;
|
||||
|
|
|
@ -57,7 +57,6 @@ class Message {
|
|||
});
|
||||
Message.contextmenu.addsubmenu("Add reaction", function (e) {
|
||||
Emoji.emojiPicker(e.x, e.y, this.localuser).then(_ => {
|
||||
console.log(_, ":3");
|
||||
this.reactionToggle(_);
|
||||
});
|
||||
});
|
||||
|
@ -287,7 +286,6 @@ class Message {
|
|||
author.bind(username);
|
||||
});
|
||||
reply.onclick = _ => {
|
||||
console.log("this got clicked :3");
|
||||
this.channel.infinite.focus(this.message_reference.message_id);
|
||||
};
|
||||
div.appendChild(replyline);
|
||||
|
@ -411,7 +409,6 @@ class Message {
|
|||
const func = this.channel.infinite.snapBottom();
|
||||
reactdiv.innerHTML = "";
|
||||
for (const thing of this.reactions) {
|
||||
console.log(thing, ":3");
|
||||
const reaction = document.createElement("div");
|
||||
reaction.classList.add("reaction");
|
||||
if (thing.me) {
|
||||
|
|
|
@ -199,7 +199,6 @@ class ButtonInput {
|
|||
return div;
|
||||
}
|
||||
onClickEvent(ev) {
|
||||
console.log("here :3");
|
||||
this.onClick();
|
||||
}
|
||||
watchForChange() { }
|
||||
|
|
|
@ -128,7 +128,6 @@ class User {
|
|||
}
|
||||
resolving = false;
|
||||
async getBadge(id) {
|
||||
console.log(id, ":3");
|
||||
if (this.localuser.badges.has(id)) {
|
||||
return this.localuser.badges.get(id);
|
||||
}
|
||||
|
@ -271,7 +270,6 @@ class User {
|
|||
const badgediv = document.createElement("div");
|
||||
badgediv.classList.add("badges");
|
||||
(async () => {
|
||||
console.log(this.badge_ids, ":3");
|
||||
if (!this.badge_ids)
|
||||
return;
|
||||
for (const id of this.badge_ids) {
|
||||
|
|
|
@ -272,7 +272,6 @@ class Channel{
|
|||
}
|
||||
get hasunreads():boolean{
|
||||
if(!this.hasPermission("VIEW_CHANNEL")){return false;}
|
||||
console.log(this.lastmessageid,!!this.lastmessageid,":3")
|
||||
return this.lastmessageid!==this.lastreadmessageid&&this.type!==4&&!!this.lastmessageid;
|
||||
}
|
||||
hasPermission(name:string,member=this.guild.member):boolean{
|
||||
|
@ -893,11 +892,9 @@ class Channel{
|
|||
return id;
|
||||
}
|
||||
private findClosest(snowflake:SnowFlake<Message>){
|
||||
console.log("in here :3");
|
||||
if(!this.lastmessage) return;
|
||||
let flake:SnowFlake<Message>|null|undefined=this.lastmessage.snowflake;
|
||||
if(!snowflake){return};
|
||||
console.log("in here :3")
|
||||
const time=snowflake.getUnixTime();
|
||||
let flaketime=flake.getUnixTime()
|
||||
while(flake&&time<flaketime){
|
||||
|
@ -1005,7 +1002,6 @@ class Channel{
|
|||
if(!this.hasPermission("VIEW_CHANNEL")){return}
|
||||
const messagez=new Message(messagep.d,this);
|
||||
this.lastmessage=messagez;
|
||||
console.log(this.lastmessageid,messagez.snowflake,":3");
|
||||
if(this.lastmessageid){
|
||||
this.idToNext.set(this.lastmessageid,messagez.snowflake);
|
||||
this.idToPrev.set(messagez.snowflake,this.lastmessageid);
|
||||
|
|
|
@ -127,10 +127,8 @@ class Emoji{
|
|||
title.textContent=Emoji.emojis[0].name;
|
||||
title.classList.add("emojiTitle");
|
||||
menu.append(title);
|
||||
console.log("menu :3");
|
||||
const selection=document.createElement("div");
|
||||
selection.classList.add("flexltr","dontshrink","emojirow");
|
||||
console.log("menu :3");
|
||||
const body=document.createElement("div");
|
||||
body.classList.add("emojiBody");
|
||||
|
||||
|
@ -221,7 +219,6 @@ class Emoji{
|
|||
}
|
||||
menu.append(selection);
|
||||
menu.append(body);
|
||||
console.log("menu :3");
|
||||
return promise;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,6 @@ class Guild{
|
|||
this.headchannels=[];
|
||||
for(const thing of this.channels){
|
||||
const parent=thing.resolveparent(this);
|
||||
console.log(parent,":3")
|
||||
if(!parent){
|
||||
this.headchannels.push(thing);
|
||||
}
|
||||
|
@ -367,14 +366,12 @@ class Guild{
|
|||
}
|
||||
}
|
||||
getHTML(){
|
||||
console.log("found :3",this.headchannels)
|
||||
//this.printServers();
|
||||
this.sortchannels();
|
||||
this.printServers();
|
||||
const build=document.createElement("div");
|
||||
|
||||
for(const thing of this.headchannels){
|
||||
console.log("found :3")
|
||||
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
||||
}
|
||||
return build;
|
||||
|
|
|
@ -62,7 +62,6 @@ class Message{
|
|||
});
|
||||
Message.contextmenu.addsubmenu("Add reaction",function(this:Message,e){
|
||||
Emoji.emojiPicker(e.x,e.y,this.localuser).then(_=>{
|
||||
console.log(_,":3")
|
||||
this.reactionToggle(_);
|
||||
});
|
||||
});
|
||||
|
@ -285,7 +284,6 @@ class Message{
|
|||
author.bind(username);
|
||||
});
|
||||
reply.onclick=_=>{
|
||||
console.log("this got clicked :3")
|
||||
this.channel.infinite.focus(this.message_reference.message_id);
|
||||
}
|
||||
div.appendChild(replyline);
|
||||
|
@ -411,7 +409,6 @@ class Message{
|
|||
const func=this.channel.infinite.snapBottom();
|
||||
reactdiv.innerHTML="";
|
||||
for(const thing of this.reactions){
|
||||
console.log(thing,":3")
|
||||
const reaction=document.createElement("div");
|
||||
reaction.classList.add("reaction");
|
||||
if(thing.me){
|
||||
|
|
|
@ -202,7 +202,6 @@ class ButtonInput implements OptionsElement{
|
|||
return div;
|
||||
}
|
||||
private onClickEvent(ev:Event){
|
||||
console.log("here :3")
|
||||
this.onClick();
|
||||
}
|
||||
watchForChange(){}
|
||||
|
|
|
@ -129,7 +129,6 @@ class User{
|
|||
}
|
||||
resolving:false|Promise<any>=false;
|
||||
async getBadge(id:string){
|
||||
console.log(id,":3")
|
||||
if(this.localuser.badges.has(id)){
|
||||
return this.localuser.badges.get(id);
|
||||
}else{
|
||||
|
@ -274,7 +273,6 @@ class User{
|
|||
const badgediv=document.createElement("div");
|
||||
badgediv.classList.add("badges");
|
||||
(async ()=>{
|
||||
console.log(this.badge_ids,":3")
|
||||
if(!this.badge_ids) return;
|
||||
for(const id of this.badge_ids){
|
||||
const badgejson=await this.getBadge(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue