Move media_viewer module to store

This commit is contained in:
Sean King 2023-04-05 13:55:38 -06:00
commit c25cfe540b
No known key found for this signature in database
GPG key ID: 510C52BACD6E7257
8 changed files with 49 additions and 56 deletions

View file

@ -13,6 +13,7 @@ import {
faLink,
faPollH
} from '@fortawesome/free-solid-svg-icons'
import { useMediaViewerStore } from '../../stores/media_viewer'
library.add(
faCircleNotch,
@ -123,7 +124,7 @@ const StatusContent = {
},
setMedia () {
const attachments = this.attachmentSize === 'hide' ? this.status.attachments : this.galleryAttachments
return () => this.$store.dispatch('setMedia', attachments)
return () => useMediaViewerStore().setMedia(attachments)
}
}
}