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,21 +56,16 @@
twoCols && 'two-cols', twoCols && 'two-cols',
!$largeInlineMedia && 'grouped-images' !$largeInlineMedia && 'grouped-images'
), ),
showBlurhash: showBlurhash: ({ sensitive, sensitiveShown, mediaAttachments }) => {
({ sensitive, sensitiveShown, mediaAttachments }) => {
return sensitive && mediaAttachments.every(attachment => !!attachment.blurhash) ? !sensitiveShown : false return sensitive && mediaAttachments.every(attachment => !!attachment.blurhash) ? !sensitiveShown : false
}, },
nCols: nCols: ({ mediaAttachments, $largeInlineMedia }) => {
({ mediaAttachments, $largeInlineMedia }) => {
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1 return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
}, },
oddCols: oddCols: ({ mediaAttachments }) => {
({ mediaAttachments }) => {
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2)) return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
}, },
twoCols: ({ mediaAttachments }) => {
twoCols:
({ mediaAttachments }) => {
return (mediaAttachments.length === 2) return (mediaAttachments.length === 2)
} }
}, },

View file

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