diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryAuthorInfoComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryAuthorInfoComponent.swift index 73908bf8dd..93883488f1 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryAuthorInfoComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryAuthorInfoComponent.swift @@ -5,6 +5,7 @@ import ComponentFlow import AccountContext import TelegramCore import TelegramStringFormatting +import MultilineTextComponent final class StoryAuthorInfoComponent: Component { let context: AccountContext @@ -79,13 +80,21 @@ final class StoryAuthorInfoComponent: Component { let titleSize = self.title.update( transition: .immediate, - component: AnyComponent(Text(text: title, font: Font.medium(14.0), color: .white)), + component: AnyComponent(MultilineTextComponent( + text: .plain(NSAttributedString(string: title, font: Font.medium(14.0), textColor: .white)), + truncationType: .end, + maximumNumberOfLines: 1 + )), environment: {}, containerSize: availableSize ) let subtitleSize = self.subtitle.update( transition: .immediate, - component: AnyComponent(Text(text: subtitle, font: Font.regular(11.0), color: UIColor(white: 1.0, alpha: 0.8))), + component: AnyComponent(MultilineTextComponent( + text: .plain(NSAttributedString(string: subtitle, font: Font.regular(11.0), textColor: UIColor(white: 1.0, alpha: 0.8))), + truncationType: .end, + maximumNumberOfLines: 1 + )), environment: {}, containerSize: availableSize ) diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift index 0793a7b064..384b435b17 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift @@ -2470,7 +2470,7 @@ public final class StoryItemSetContainerComponent: Component { } })), environment: {}, - containerSize: CGSize(width: max(10.0, contentFrame.width - headerRightOffset), height: 44.0) + containerSize: CGSize(width: max(10.0, headerRightOffset), height: 44.0) ) if let view = currentCenterInfoItem.view.view { var animateIn = false