2
0
Fork 0

hopefully fix 429s and the setDeleted error

This commit is contained in:
notfire 2025-09-07 19:17:17 -04:00
commit 4f402d43a4
No known key found for this signature in database
2 changed files with 20 additions and 11 deletions

View file

@ -58,6 +58,13 @@ const StillImage = {
}
},
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
fetch(image.src, {
referrerPolicy: 'same-origin'

View file

@ -467,8 +467,10 @@ export const mutations = {
newStatus.bookmarked = status.bookmarked
},
setDeleted (state, { status }) {
const newStatus = state.allStatusesObject[status.id]
if (newStatus) newStatus.deleted = true
if (status) {
const newStatus = state.allStatusesObject[status.id]
if (newStatus) newStatus.deleted = true
}
},
setManyDeleted (state, condition) {
Object.values(state.allStatusesObject).forEach(status => {