Forráskód Böngészése

Merge branch 'quotes-hide-card' into 'develop'

Don't display link preview card if it's the same as quoted status

See merge request pleroma/pleroma-fe!1858
tusooa 1 éve
szülő
commit
3c38a79526

+ 1 - 0
changelog.d/quote-hide.fix

@@ -0,0 +1 @@
+don't display quoted status twice

+ 4 - 0
src/components/status_content/status_content.js

@@ -73,6 +73,10 @@ const StatusContent = {
   },
   computed: {
     ...controlledOrUncontrolledGetters(['showingTall', 'expandingSubject', 'showingLongSubject']),
+    statusCard () {
+      if (!this.status.card) return null
+      return this.status.card.url === this.status.quote_url ? null : status.card
+    },
     hideAttachments () {
       return (this.mergedConfig.hideAttachments && !this.inConversation) ||
         (this.mergedConfig.hideAttachmentsInConv && this.inConversation)

+ 1 - 1
src/components/status_content/status_content.vue

@@ -43,7 +43,7 @@
       />
 
       <div
-        v-if="status.card && !noHeading && !compact"
+        v-if="statusCard && !noHeading && !compact"
         class="link-preview media-body"
       >
         <link-preview