(null)
const {active, setActive, sendPosition, currentActiveView} =
@@ -76,13 +71,10 @@ export function VideoEmbed({
}
let constrained: number | undefined
- let max: number | undefined
if (aspectRatio !== undefined) {
const ratio = 1 / 2 // max of 1:2 ratio in feeds
constrained = Math.max(aspectRatio, ratio)
- max = Math.max(aspectRatio, 0.25) // max of 1:4 in thread
}
- const cropDisabled = crop === 'none'
const contents = (
evt.stopPropagation()}>
@@ -114,28 +109,15 @@ export function VideoEmbed({
- {cropDisabled ? (
-
- {contents}
-
- ) : (
-
- {contents}
-
- )}
+
+ {contents}
+
+
)
diff --git a/src/components/Post/Embed/index.tsx b/src/components/Post/Embed/index.tsx
index 1462ef542f..6382412b56 100644
--- a/src/components/Post/Embed/index.tsx
+++ b/src/components/Post/Embed/index.tsx
@@ -112,7 +112,7 @@ function MediaEmbed({
-
+
)
}
diff --git a/src/view/com/util/images/AutoSizedImage.tsx b/src/view/com/util/images/AutoSizedImage.tsx
index e248ea5414..92210e55e7 100644
--- a/src/view/com/util/images/AutoSizedImage.tsx
+++ b/src/view/com/util/images/AutoSizedImage.tsx
@@ -13,7 +13,7 @@ import {useLingui} from '@lingui/react'
import {type Dimensions} from '#/lib/media/types'
import {isNative} from '#/platform/detection'
import {useLargeAltBadgeEnabled} from '#/state/preferences/large-alt-badge'
-import {atoms as a, useBreakpoints, useTheme} from '#/alf'
+import {atoms as a, useTheme} from '#/alf'
import {ArrowsDiagonalOut_Stroke2_Corner0_Rounded as Fullscreen} from '#/components/icons/ArrowsDiagonal'
import {MediaInsetBorder} from '#/components/MediaInsetBorder'
import {Text} from '#/components/Typography'
@@ -30,18 +30,16 @@ export function ConstrainedImage({
children: React.ReactNode
}) {
const t = useTheme()
- const {gtMobile} = useBreakpoints()
/**
* Computed as a % value to apply as `paddingTop`, this basically controls
* the height of the image.
*/
const outerAspectRatio = React.useMemo(() => {
- const ratio =
- isNative || !gtMobile
- ? Math.min(1 / aspectRatio, minMobileAspectRatio ?? 16 / 9) // 9:16 bounding box
- : Math.min(1 / aspectRatio, 1) // 1:1 bounding box
+ const ratio = isNative
+ ? Math.min(1 / aspectRatio, minMobileAspectRatio ?? 16 / 9) // 9:16 bounding box
+ : Math.min(1 / aspectRatio, 1) // 1:1 bounding box
return `${ratio * 100}%`
- }, [aspectRatio, gtMobile, minMobileAspectRatio])
+ }, [aspectRatio, minMobileAspectRatio])
return (