diff --git a/src/hooks/useRouteQueryStackedNotes.hook.ts b/src/hooks/useRouteQueryStackedNotes.hook.ts index 805150f..5583405 100644 --- a/src/hooks/useRouteQueryStackedNotes.hook.ts +++ b/src/hooks/useRouteQueryStackedNotes.hook.ts @@ -40,22 +40,22 @@ export const useRouteQueryStackedNotes = () => { }) } - const addStackedNote = (currentSHA: string, sha: string) => { + const addStackedNote = (currentSha: string, sha: string) => { if (stackedNotes.value.includes(sha)) { scrollToFocusedNote(sha) return } - if (!currentSHA) { + if (!currentSha) { stackedNotes.value = [sha] } else { const [splittedStackedNotes] = stackedNotes.value .join(';') - .split(currentSHA) + .split(currentSha) const newStackedNotes = [ ...splittedStackedNotes.replaceAll(';;', ';').split(';'), - currentSHA, + currentSha, sha ].filter((sha) => !!sha) diff --git a/src/modules/repo/store/userRepo.store.ts b/src/modules/repo/store/userRepo.store.ts index 9e4aca0..d54a865 100644 --- a/src/modules/repo/store/userRepo.store.ts +++ b/src/modules/repo/store/userRepo.store.ts @@ -36,6 +36,7 @@ export const useUserRepoStore = defineStore({ this.isReadmeOffline = true this.user = newUser this.repo = newRepo + try { await refreshToken() } catch (error) { @@ -57,11 +58,11 @@ export const useUserRepoStore = defineStore({ .then((readme) => { this.readme = readme - // if the offline state is too quick, + // if the offline state is too fast, // it gives an impression of glitch. setTimeout(() => { this.isReadmeOffline = false - }, 500) + }, 350) }) }, resetUserRepo() {