fix: remove unused nCols computation (#1420)
This commit is contained in:
parent
ada6b9f699
commit
dd625b80a0
|
@ -56,23 +56,18 @@
|
||||||
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: ({ mediaAttachments, $largeInlineMedia }) => {
|
||||||
nCols:
|
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
|
||||||
({ mediaAttachments, $largeInlineMedia }) => {
|
},
|
||||||
return (!$largeInlineMedia && mediaAttachments.length > 1) ? 2 : 1
|
oddCols: ({ mediaAttachments }) => {
|
||||||
},
|
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
|
||||||
oddCols:
|
},
|
||||||
({ mediaAttachments }) => {
|
twoCols: ({ mediaAttachments }) => {
|
||||||
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
|
return (mediaAttachments.length === 2)
|
||||||
},
|
}
|
||||||
|
|
||||||
twoCols:
|
|
||||||
({ mediaAttachments }) => {
|
|
||||||
return (mediaAttachments.length === 2)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Media
|
Media
|
||||||
|
|
|
@ -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: ({ mediaAttachments }) => {
|
||||||
oddCols:
|
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
|
||||||
({ mediaAttachments }) => {
|
},
|
||||||
return (mediaAttachments.length > 1 && (mediaAttachments.length % 2))
|
twoCols: ({ mediaAttachments }) => {
|
||||||
},
|
return (mediaAttachments.length === 2)
|
||||||
|
}
|
||||||
twoCols:
|
|
||||||
({ mediaAttachments }) => {
|
|
||||||
return (mediaAttachments.length === 2)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleSensitiveMedia () {
|
toggleSensitiveMedia () {
|
||||||
|
|
Loading…
Reference in a new issue