diff --git a/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue b/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue
index a95336df5c..8e7cf08b76 100644
--- a/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue
@@ -15,8 +15,8 @@
-
@@ -181,13 +181,25 @@ export default {
})
}
},
- openImage (url) {
- this.$store.dispatch('TimelineSpace/Modals/ImageViewer/openModal', url)
+ openImage (url, rawMediaList) {
+ const mediaList = rawMediaList.map((media) => {
+ return media.url
+ })
+ const currentIndex = mediaList.indexOf(url)
+ this.$store.dispatch(
+ 'TimelineSpace/Modals/ImageViewer/openModal',
+ {
+ currentIndex: currentIndex,
+ mediaList: mediaList
+ })
},
openUser (account) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
+ },
+ mediaAttachements (message) {
+ return this.originalMessage(message).media_attachments
}
}
}
diff --git a/src/renderer/components/TimelineSpace/Modals/ImageViewer.vue b/src/renderer/components/TimelineSpace/Modals/ImageViewer.vue
index 12066fe43c..0a331b0c94 100644
--- a/src/renderer/components/TimelineSpace/Modals/ImageViewer.vue
+++ b/src/renderer/components/TimelineSpace/Modals/ImageViewer.vue
@@ -6,7 +6,9 @@