livechan fixes
This commit is contained in:
		@@ -684,8 +684,9 @@ ConvoBar.prototype.update = function(msgid, data) {
 | 
				
			|||||||
    // remove oldest from convo tracker
 | 
					    // remove oldest from convo tracker
 | 
				
			||||||
    var child_data = self.holder[msgid].posts.shift();
 | 
					    var child_data = self.holder[msgid].posts.shift();
 | 
				
			||||||
    var child = document.getElementById("livechan_chat_"+child_data.ShortHash);
 | 
					    var child = document.getElementById("livechan_chat_"+child_data.ShortHash);
 | 
				
			||||||
    // remove element from main chat element
 | 
					    if(child) {
 | 
				
			||||||
    self.parent.chatElems.output.removeChild(child.parentNode.parentElement);
 | 
					      child.remove();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -710,6 +711,7 @@ ConvoBar.prototype.registerConvo = function(msgid, data) {
 | 
				
			|||||||
    msgid: data.Message_id,
 | 
					    msgid: data.Message_id,
 | 
				
			||||||
    id: max_id + 1,
 | 
					    id: max_id + 1,
 | 
				
			||||||
    posts: [],
 | 
					    posts: [],
 | 
				
			||||||
 | 
					    ShortHash: data.ShortHash,
 | 
				
			||||||
    select: function() {
 | 
					    select: function() {
 | 
				
			||||||
      console.log("selected convo "+msgid);
 | 
					      console.log("selected convo "+msgid);
 | 
				
			||||||
      if ( self.active !== msgid ) {
 | 
					      if ( self.active !== msgid ) {
 | 
				
			||||||
@@ -1107,12 +1109,14 @@ Chat.prototype.scroll = function() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/** @brief roll over old posts, remove them from ui */
 | 
					/** @brief roll over old posts, remove them from ui */
 | 
				
			||||||
Chat.prototype.rollover = function() {
 | 
					Chat.prototype.rollover = function() {
 | 
				
			||||||
 | 
					  /*
 | 
				
			||||||
  var self = this;
 | 
					  var self = this;
 | 
				
			||||||
  var chatSize = self.options.scrollback || 50;
 | 
					  var chatSize = self.options.scrollback || 50;
 | 
				
			||||||
  var e = self.chatElems.output;
 | 
					  var e = self.chatElems.output;
 | 
				
			||||||
  while ( e.childNodes.length > chatSize ) {
 | 
					  while ( e.childNodes.length > chatSize ) {
 | 
				
			||||||
    e.childNodes[0].remove();
 | 
					    e.childNodes[0].remove();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* @brief Inserts the chat into the DOM, overwriting if need be.
 | 
					/* @brief Inserts the chat into the DOM, overwriting if need be.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user