forked from AkkomaGang/akkoma-fe
Merge branch 'fix/prevent-repeated-fetching' into 'develop'
#485 Prevent repeated fetching Closes #485 See merge request pleroma/pleroma-fe!738
This commit is contained in:
commit
b3ace226fb
2 changed files with 8 additions and 4 deletions
|
@ -31,15 +31,19 @@ const LoginForm = {
|
|||
username: this.user.username,
|
||||
password: this.user.password
|
||||
}
|
||||
).then((result) => {
|
||||
).then(async (result) => {
|
||||
if (result.error) {
|
||||
this.authError = result.error
|
||||
this.user.password = ''
|
||||
return
|
||||
}
|
||||
this.$store.commit('setToken', result.access_token)
|
||||
this.$store.dispatch('loginUser', result.access_token)
|
||||
try {
|
||||
await this.$store.dispatch('loginUser', result.access_token)
|
||||
this.$router.push({name: 'friends'})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
|
@ -52,7 +52,7 @@ const Timeline = {
|
|||
|
||||
window.addEventListener('scroll', this.scrollLoad)
|
||||
|
||||
if (this.timelineName === 'friends' && !credentials) { return false }
|
||||
if (store.state.api.fetchers[this.timelineName]) { return false }
|
||||
|
||||
timelineFetcher.fetchAndUpdate({
|
||||
store,
|
||||
|
|
Loading…
Reference in a new issue