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
@ -31,15 +31,19 @@ const LoginForm = {
|
|||||||
username: this.user.username,
|
username: this.user.username,
|
||||||
password: this.user.password
|
password: this.user.password
|
||||||
}
|
}
|
||||||
).then((result) => {
|
).then(async (result) => {
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
this.authError = result.error
|
this.authError = result.error
|
||||||
this.user.password = ''
|
this.user.password = ''
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.commit('setToken', result.access_token)
|
this.$store.commit('setToken', result.access_token)
|
||||||
this.$store.dispatch('loginUser', result.access_token)
|
try {
|
||||||
this.$router.push({name: 'friends'})
|
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)
|
window.addEventListener('scroll', this.scrollLoad)
|
||||||
|
|
||||||
if (this.timelineName === 'friends' && !credentials) { return false }
|
if (store.state.api.fetchers[this.timelineName]) { return false }
|
||||||
|
|
||||||
timelineFetcher.fetchAndUpdate({
|
timelineFetcher.fetchAndUpdate({
|
||||||
store,
|
store,
|
||||||
|
Loading…
Reference in New Issue
Block a user