Skip to content

Commit

Permalink
Update app launching behavior (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyel authored Oct 4, 2024
1 parent f139e5f commit 47c6ac0
Show file tree
Hide file tree
Showing 11 changed files with 77 additions and 66 deletions.
13 changes: 7 additions & 6 deletions src/components/tasks/TaskCrowding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskFluency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskLetter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskLevante.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskMEP.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskMultichoice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskPA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskRan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskSRE.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskSWR.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down
13 changes: 7 additions & 6 deletions src/components/tasks/TaskVocab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ onMounted(async () => {
}
if (roarfirekit.value.restConfig) init();
if (isFirekitInit.value && !isLoadingUserData.value) {
await startTask();
}
});
onBeforeUnmount(() => {
window.removeEventListener('popstate', handlePopState);
});
watch([isFirekitInit, isLoadingUserData], async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
});
watch(
[isFirekitInit, isLoadingUserData],
async ([newFirekitInitValue, newLoadingUserData]) => {
if (newFirekitInitValue && !newLoadingUserData) await startTask();
},
{ immediate: true },
);
const { selectedAdmin } = storeToRefs(gameStore);
Expand Down

0 comments on commit 47c6ac0

Please sign in to comment.