hopefully fix 429s and the setDeleted error
This commit is contained in:
parent
0b05ec0ce1
commit
4f402d43a4
2 changed files with 20 additions and 11 deletions
|
|
@ -58,6 +58,13 @@ const StillImage = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
detectAnimationWithFetch (image) {
|
detectAnimationWithFetch (image) {
|
||||||
|
if (!this.$store.fetchedimgs)
|
||||||
|
this.$store.fetchedimgs = []
|
||||||
|
else
|
||||||
|
if (this.$store.fetchedimgs.indexOf(image.src) === -1)
|
||||||
|
this.$store.fetchedimgs.push(image.src)
|
||||||
|
else
|
||||||
|
return
|
||||||
// Browser Cache should ensure image doesn't get loaded twice if cache exists
|
// Browser Cache should ensure image doesn't get loaded twice if cache exists
|
||||||
fetch(image.src, {
|
fetch(image.src, {
|
||||||
referrerPolicy: 'same-origin'
|
referrerPolicy: 'same-origin'
|
||||||
|
|
|
||||||
|
|
@ -467,8 +467,10 @@ export const mutations = {
|
||||||
newStatus.bookmarked = status.bookmarked
|
newStatus.bookmarked = status.bookmarked
|
||||||
},
|
},
|
||||||
setDeleted (state, { status }) {
|
setDeleted (state, { status }) {
|
||||||
|
if (status) {
|
||||||
const newStatus = state.allStatusesObject[status.id]
|
const newStatus = state.allStatusesObject[status.id]
|
||||||
if (newStatus) newStatus.deleted = true
|
if (newStatus) newStatus.deleted = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setManyDeleted (state, condition) {
|
setManyDeleted (state, condition) {
|
||||||
Object.values(state.allStatusesObject).forEach(status => {
|
Object.values(state.allStatusesObject).forEach(status => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue