lower timeout time

This commit is contained in:
Julien Calixte
2023-09-09 20:43:45 +02:00
parent 11158519f5
commit 4adaad8683
2 changed files with 7 additions and 6 deletions

View File

@@ -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)

View File

@@ -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() {