Remove unnecessary console logging

- removing since nightly users have access to devtools
This commit is contained in:
Mattias Granlund 2023-10-01 10:49:31 +02:00
parent 6528fb7400
commit b2a9d2efcf
9 changed files with 1 additions and 29 deletions

View File

@ -74,10 +74,8 @@ const withRequestId: FetchMiddleware = (fetch) => async (url, options) => {
};
const withLog: FetchMiddleware = (fetch) => async (url, options) => {
console.log('fetch', url, options);
try {
const resp = await fetch(url, options);
console.log(resp);
return resp;
} catch (e: any) {
console.error('fetch', e);

View File

@ -36,9 +36,6 @@
}
}
ranges = mergeTouchingRanges(ranges);
if (ranges.length > 0) {
console.log({ ranges, line });
}
return ranges;
};
@ -91,14 +88,6 @@
const isHighlighted = mark.some(([from, to]) => {
const is = isIntersecting([from, to], [tokenPos, tokenPos + text.length]);
if (is) {
console.log({
pos: [from, to],
tokenPos: [tokenPos, tokenPos + text.length],
text,
is
});
}
return is;
});
tokenPos += text.length;

View File

@ -62,11 +62,5 @@ export async function invoke<T>(command: string, params: Record<string, unknown>
export function listen<T>(event: EventName, handle: EventCallback<T>) {
const unlisten = listenTauri(event, handle);
// console.log('listen', event);
return () => {
unlisten.then((unlisten) => {
unlisten();
// console.log('unlisten', event);
});
};
return () => unlisten.then((unlistenFn) => unlistenFn());
}

View File

@ -20,7 +20,6 @@ export default async function (): Promise<PostHogClient> {
// noop
},
loaded: (instance) => {
console.log('Posthog loaded');
instance.register_for_session({
appName,
appVersion

View File

@ -36,7 +36,6 @@ export class Ownership {
hunks.delete(hunkId);
if (hunks.size === 0) this.files.delete(fileId);
}
console.log('after remove', this.toString());
return this;
}

View File

@ -10,7 +10,6 @@
let installing = false;
const onUpdateClicked = async () => {
installing = true;
console.log(await getVersion());
await installUpdate()
.finally(() => {
installing = false;
@ -18,7 +17,6 @@
.catch((e) => {
toasts.error(e.message);
});
console.log(await getVersion());
};
</script>

View File

@ -89,7 +89,6 @@
}
function merge() {
console.log(`merge ${branch.id}`);
branchController.mergeUpstream(branch.id);
}
@ -165,7 +164,6 @@
if ($user) {
cloud.summarize.branch($user.access_token, { diff }).then((result) => {
console.log(result);
if (result.message && result.message !== branch.name) {
branch.name = result.message;
handleBranchNameChange();

View File

@ -15,11 +15,9 @@
}>();
export function openByMouse(e: MouseEvent, item: any) {
console.log(popupMenu);
popupMenu.openByMouse(e, item);
}
export function openByElement(elt: HTMLElement, item: any) {
console.log(popupMenu);
popupMenu.openByElement(elt, item);
}
</script>

View File

@ -103,7 +103,6 @@
class="z-30"
on:height={(e) => {
treeHeight = e.detail;
console.log(branchId);
lscache.set(treeHeightKey + branchId, e.detail, 7 * 1440); // 7 day ttl
userSettings.update((s) => ({ ...s, defaultTreeHeight: e.detail }));
}}