Enable coexistence of horizontal and vertical posts (#37204)

This commit is contained in:
Itoh Shimon authored and GitHub committed 2026-02-06 09:51:22 +00:00
1 parent 7a4945c0d3
commit 96de28dd6f
4 files changed
+103 -5

No files matched your search

@@ -108,11 +108,12 @@ class StatusContent extends PureComponent {
const { status, onCollapsedToggle } = this.props;
if (status.get('collapsed', null) === null && onCollapsedToggle) {
const { collapsible, onClick } = this.props;
const text = node.querySelector(':scope > .status__content__text');
const collapsed =
collapsible
&& onClick
&& node.clientHeight > MAX_HEIGHT
&& (node.clientHeight > MAX_HEIGHT || (text !== null && text.scrollWidth > text.clientWidth))
&& status.get('spoiler_text').length === 0;
onCollapsedToggle(collapsed);