Remove some useless console.debug calls

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-08-22 13:46:42 +02:00
parent e07f88277b
commit ffac91a027
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
4 changed files with 0 additions and 19 deletions

View File

@ -178,7 +178,6 @@ const initializeCurrentUser = () => {
const role = localStorage.getItem(AUTH_USER_ROLE);
if (userId && userEmail && accessToken && role) {
console.log("Saving current user client from localstorage", role);
updateCurrentUser({
id: userId,
email: userEmail,
@ -197,19 +196,16 @@ const refreshApp = async (
if (!worker) {
return Promise.resolve();
}
console.debug("Doing worker.skipWaiting().");
return new Promise((resolve, reject) => {
const channel = new MessageChannel();
channel.port1.onmessage = (event) => {
console.debug("Done worker.skipWaiting().");
if (event.data.error) {
reject(event.data);
} else {
resolve(event.data);
}
};
console.debug("calling skip waiting");
worker?.postMessage({ type: "skip-waiting" }, [channel.port2]);
});
};

View File

@ -99,8 +99,6 @@ export default function buildCurrentUserResolver(
},
};
console.debug("updating current actor", data);
localCache.writeQuery({ data, query: CURRENT_ACTOR_CLIENT });
},
updateCurrentUserLocation: (

View File

@ -16,7 +16,6 @@ export function saveActorData(obj: IPerson): void {
}
export async function changeIdentity(identity: IPerson): Promise<void> {
console.debug("Changing identity to", identity);
if (!identity.id) return;
const { mutate: updateCurrentActorClient } = provideApolloClient(
apolloClient
@ -35,21 +34,14 @@ export async function changeIdentity(identity: IPerson): Promise<void> {
*/
export async function initializeCurrentActor(): Promise<void> {
const actorId = localStorage.getItem(AUTH_USER_ACTOR_ID);
console.debug(
"initializing current actor, using actorId from localstorage",
actorId
);
const { result: identitiesResult } = provideApolloClient(apolloClient)(() =>
useQuery<{ identities: IPerson[] }>(IDENTITIES)
);
console.debug("identitiesResult", identitiesResult);
const identities = computed(() => identitiesResult.value?.identities);
watch(identities, async () => {
console.debug("identities found", identities.value);
if (identities.value && identities.value.length < 1) {
console.warn("Logged user has no identities!");
throw new NoIdentitiesException();
@ -59,10 +51,7 @@ export async function initializeCurrentActor(): Promise<void> {
(identity: IPerson | undefined) => identity?.id === actorId
) || ((identities.value || [])[0] as IPerson);
console.debug("active identity is", activeIdentity);
if (activeIdentity) {
console.debug("active identity found, setting it up");
await changeIdentity(activeIdentity);
}
});

View File

@ -374,9 +374,7 @@ onMounted(() => {
const router = useRouter();
watch(loggedUser, (loggedUserValue) => {
console.debug("Try to detect empty user settings", loggedUserValue);
if (loggedUserValue?.id && loggedUserValue?.settings === null) {
console.debug("No user settings, pushing to onboarding assistant");
router.push({
name: RouteName.WELCOME_SCREEN,
params: { step: "1" },