Skip to content

Commit b9f8c69

Browse files
committed
#6: Dismissing toasts when switching lessons.
1 parent cb981ae commit b9f8c69

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/composables/useFileManagerStore.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ export const useFileManagerStore = defineStore('file-manager', () => {
4949
eventSource.addEventListener('filesChanged', async (event) => {
5050
const { lessonName, files, error } = JSON.parse(event.data);
5151

52+
toast.dismissAll();
53+
5254
// most likely the yv-lesson.json file is not available
5355
if (error) {
54-
// we switched lessons in amoxtli-vue
55-
// clear last lesson's toasts
56-
// toast.dismissAll();
57-
5856
console.error('[yehyecoa-vue]: Server reported an issue:', error);
5957
toast.error('Error', {
6058
description: error,
@@ -136,9 +134,6 @@ export const useFileManagerStore = defineStore('file-manager', () => {
136134

137135
watch(currentSession, (newSession, _, onCleanup) => {
138136
if (newSession) {
139-
// console.log('[yehyecoa-vue]: New active session:', newSession);
140-
// toast.dismissAll();
141-
142137
const subscription = snapshots.liveQuerySnapshots(newSession.id).subscribe((snaps) => {
143138
snapshotsList.value = snaps;
144139
});

0 commit comments

Comments
 (0)