cleanup console spam

This commit is contained in:
Iris Lightshard 2024-07-06 12:52:12 -06:00
parent 6fc115ff41
commit b990c13f78
Signed by: nilix
GPG Key ID: 688407174966CAF3
2 changed files with 1 additions and 9 deletions

View File

@ -45,9 +45,7 @@ export class AdapterElement extends HTMLElement {
// initialize the view if it's changed
const view = this.getAttribute("data-view");
if (this._view != view ?? "index") {
console.log("view changed! let's go")
this._view = view ?? "index";
console.log(this._view);
switch (this._view) {
case "index":
this.setIdxView();
@ -68,7 +66,6 @@ export class AdapterElement extends HTMLElement {
const latest = this.getAttribute("latest");
if (latest ?? "" != this._latest) {
this._latest = latest ?? "";
console.log("about to update the index view");
let datastore = _("datastore");
console.log(datastore);
const latestMsg = datastore.messages.get(this._latest);
@ -160,20 +157,16 @@ export class AdapterElement extends HTMLElement {
}
buildThreads() {
console.log("building threads for " + this._name);
const datastore = _("datastore")[this._name];
// make multiple passes over the store until every message is either
// placed in a thread, or orphaned and waiting for its parent to be returned
do{
console.log("making a pass at all the messages");
for (let k of datastore.messages.keys()) {
this.placeMsg(k);
}
} while (this._threads.reduce((sum: number, thread: MessageThread)=>{
return sum + thread.messageCount;
}, 0) + this._orphans.length < datastore.messages.keys().length)
console.log("all messages have been placed");
console.log(JSON.stringify(this._threads));
}, 0) + this._orphans.length < datastore.messages.keys().length);
}
placeMsg(k: string): string | null {

View File

@ -95,7 +95,6 @@ export class SettingsElement extends HTMLElement {
let adapterdata: any = {};
// get selected adapter protocol
const proto = $("settings_newadapter_protocolselect") as HTMLSelectElement;
console.log(proto.options[proto.selectedIndex]);
const nickname = ($("settings_newadapter_nickname") as HTMLInputElement)?.value ?? "" ;