From 17735943d5cdde1eb852d36f1c3bb699d23f7eb6 Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 14 Jan 2019 19:23:13 +0200 Subject: Add media viewer module and media module component, modify attachment behavior --- src/components/status/status.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 73d53694..8058e1bb 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -35,7 +35,8 @@ const Status = { expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined' ? !this.$store.state.instance.collapseMessageWithSubject : !this.$store.state.config.collapseMessageWithSubject, - betterShadow: this.$store.state.interface.browserSupport.cssFilter + betterShadow: this.$store.state.interface.browserSupport.cssFilter, + maxAttachments: 9 } }, computed: { @@ -201,7 +202,8 @@ const Status = { }, attachmentSize () { if ((this.$store.state.config.hideAttachments && !this.inConversation) || - (this.$store.state.config.hideAttachmentsInConv && this.inConversation)) { + (this.$store.state.config.hideAttachmentsInConv && this.inConversation) || + (this.status.attachments.length > this.maxAttachments)) { return 'hide' } else if (this.compact) { return 'small' @@ -291,6 +293,10 @@ const Status = { }, userProfileLink (id, name) { return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames) + }, + setMedia () { + const attachments = this.status.attachments + return () => this.$store.dispatch('setMedia', attachments) } }, watch: { -- cgit v1.2.3-70-g09d2