lower timeout time
This commit is contained in:
@@ -40,22 +40,22 @@ export const useRouteQueryStackedNotes = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const addStackedNote = (currentSHA: string, sha: string) => {
|
const addStackedNote = (currentSha: string, sha: string) => {
|
||||||
if (stackedNotes.value.includes(sha)) {
|
if (stackedNotes.value.includes(sha)) {
|
||||||
scrollToFocusedNote(sha)
|
scrollToFocusedNote(sha)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentSHA) {
|
if (!currentSha) {
|
||||||
stackedNotes.value = [sha]
|
stackedNotes.value = [sha]
|
||||||
} else {
|
} else {
|
||||||
const [splittedStackedNotes] = stackedNotes.value
|
const [splittedStackedNotes] = stackedNotes.value
|
||||||
.join(';')
|
.join(';')
|
||||||
.split(currentSHA)
|
.split(currentSha)
|
||||||
|
|
||||||
const newStackedNotes = [
|
const newStackedNotes = [
|
||||||
...splittedStackedNotes.replaceAll(';;', ';').split(';'),
|
...splittedStackedNotes.replaceAll(';;', ';').split(';'),
|
||||||
currentSHA,
|
currentSha,
|
||||||
sha
|
sha
|
||||||
].filter((sha) => !!sha)
|
].filter((sha) => !!sha)
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export const useUserRepoStore = defineStore({
|
|||||||
this.isReadmeOffline = true
|
this.isReadmeOffline = true
|
||||||
this.user = newUser
|
this.user = newUser
|
||||||
this.repo = newRepo
|
this.repo = newRepo
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await refreshToken()
|
await refreshToken()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -57,11 +58,11 @@ export const useUserRepoStore = defineStore({
|
|||||||
.then((readme) => {
|
.then((readme) => {
|
||||||
this.readme = readme
|
this.readme = readme
|
||||||
|
|
||||||
// if the offline state is too quick,
|
// if the offline state is too fast,
|
||||||
// it gives an impression of glitch.
|
// it gives an impression of glitch.
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.isReadmeOffline = false
|
this.isReadmeOffline = false
|
||||||
}, 500)
|
}, 350)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetUserRepo() {
|
resetUserRepo() {
|
||||||
|
|||||||
Reference in New Issue
Block a user