Commit 73a4a740 by Jonathan Thomas

Update project thumbnail when returning to the projects view. Adding ability to…

Update project thumbnail when returning to the projects view. Adding ability to clobber a thumbnail.
parent 521fa85f
......@@ -409,6 +409,11 @@ export default createStore({
}
let sessionKey = `${objectType}-${Obj.id}-frame${payload.frame}`
if (payload.clobber) {
// Destroy existing cached thumbnail
sessionStorage.removeItem(sessionKey)
}
let data = {
"frame_number": payload.frame,
"width": 480,
......
......@@ -37,7 +37,7 @@ export default {
this.checkExportProgress(this.activeExports[0])
}
},
...mapActions(['getProject', 'loadExports', 'checkExportProgress', 'loadEffects']),
...mapActions(['getProject', 'loadExports', 'checkExportProgress', 'loadEffects', 'attachThumbnail']),
...mapMutations(['addError', 'setProject', 'setExports'])
},
computed: {
......@@ -66,6 +66,9 @@ export default {
this.exportPollInterval = setInterval(this.pollForExports, 2500)
},
unmounted() {
// Update project thumbnail
let thumbnail_payload = { obj: this.project, frame: 1, clobber: true }
this.attachThumbnail(thumbnail_payload)
this.setProject(null)
this.setExports([])
if (this.exportPollInterval) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment