fix: remove unused nCols computation (#1420)

This commit is contained in:
Nolan Lawson 2019-08-21 23:26:16 -07:00 committed by GitHub
parent ada6b9f699
commit dd625b80a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 31 deletions

View file

@ -56,23 +56,18 @@
twoCols && 'two-cols',
!$largeInlineMedia && 'grouped-images'
),
showBlurhash:
({ sensitive, sensitiveShown, mediaAttachments }) => {
return sensitive && mediaAttachments.every(attachment => !!attachment.blurhash) ? !sensitiveShown : false
},
nCols:
({ mediaAttachments, $largeInlineMedia }) => {
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
},
oddCols:
({ mediaAttachments }) => {
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
},
twoCols:
({ mediaAttachments }) => {
return (mediaAttachments.length === 2)
}
showBlurhash: ({ sensitive, sensitiveShown, mediaAttachments }) => {
return sensitive && mediaAttachments.every(attachment => !!attachment.blurhash) ? !sensitiveShown : false
},
nCols: ({ mediaAttachments, $largeInlineMedia }) => {
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
},
oddCols: ({ mediaAttachments }) => {
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
},
twoCols: ({ mediaAttachments }) => {
return (mediaAttachments.length === 2)
}
},
components: {
Media

View file

@ -237,20 +237,15 @@
'status-sensitive-media-svg',
canUseBlurhash && 'status-sensitive-media-svg-transparent'
),
nCols:
({ mediaAttachments, $largeInlineMedia }) => {
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
},
oddCols:
({ mediaAttachments }) => {
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
},
twoCols:
({ mediaAttachments }) => {
return (mediaAttachments.length === 2)
}
nCols: ({ mediaAttachments, $largeInlineMedia }) => {
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
},
oddCols: ({ mediaAttachments }) => {
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
},
twoCols: ({ mediaAttachments }) => {
return (mediaAttachments.length === 2)
}
},
methods: {
toggleSensitiveMedia () {