diff --git a/submodules/TelegramUI/Components/MessageInputPanelComponent/Sources/MessageInputPanelComponent.swift b/submodules/TelegramUI/Components/MessageInputPanelComponent/Sources/MessageInputPanelComponent.swift index a8261d8d72..86aa8224ef 100644 --- a/submodules/TelegramUI/Components/MessageInputPanelComponent/Sources/MessageInputPanelComponent.swift +++ b/submodules/TelegramUI/Components/MessageInputPanelComponent/Sources/MessageInputPanelComponent.swift @@ -178,12 +178,14 @@ public final class MessageInputPanelComponent: Component { public var isExpanded: Bool public var isEmpty: Bool public var hasUnseenMessages: Bool + public var isUnifiedStream: Bool - public init(isEnabled: Bool, isExpanded: Bool, isEmpty: Bool, hasUnseenMessages: Bool) { + public init(isEnabled: Bool, isExpanded: Bool, isEmpty: Bool, hasUnseenMessages: Bool, isUnifiedStream: Bool) { self.isEnabled = isEnabled self.isExpanded = isExpanded self.isEmpty = isEmpty self.hasUnseenMessages = hasUnseenMessages + self.isUnifiedStream = isUnifiedStream } } @@ -1065,7 +1067,7 @@ public final class MessageInputPanelComponent: Component { rightAction = ChatTextInputPanelComponent.RightAction(kind: .empty, action: { _ in }) } var secondaryRightAction: ChatTextInputPanelComponent.RightAction? - if component.isEmbeddedInCamera, let call = component.call { + if component.isEmbeddedInCamera, let call = component.call, let liveChatState = component.liveChatState, !liveChatState.isUnifiedStream { secondaryRightAction = ChatTextInputPanelComponent.RightAction(kind: .liveMicrophone(call: call), action: { [weak self] sourceView in guard let self, let component = self.component else { return diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContentLiveChatComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContentLiveChatComponent.swift index ef2c38820a..8b4f3ce149 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContentLiveChatComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContentLiveChatComponent.swift @@ -421,7 +421,7 @@ final class StoryContentLiveChatComponent: Component { } var items: [ContextMenuItem] = [] - if !isPinned { + if !isPinned, let messagesState = self.messagesState, let message = messagesState.messages.first(where: { $0.id == id }), !message.text.isEmpty { items.append(.action(ContextMenuActionItem(text: presentationData.strings.Conversation_ContextMenuCopy, textColor: .primary, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Copy"), color: theme.contextMenu.primaryColor) }, action: { [weak self] c, _ in guard let self else { return diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift index 48f6da7bd7..35fed310fd 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemContentComponent.swift @@ -119,8 +119,9 @@ final class StoryItemContentComponent: Component { var starStats: StarStats? var isAdmin: Bool var defaultSendAs: EnginePeer.Id? + var isUnifiedStream: Bool - init(isExpanded: Bool, isEmpty: Bool, hasUnseenMessages: Bool, areMessagesEnabled: Bool, minMessagePrice: Int64?, starStats: StarStats?, isAdmin: Bool, defaultSendAs: EnginePeer.Id?) { + init(isExpanded: Bool, isEmpty: Bool, hasUnseenMessages: Bool, areMessagesEnabled: Bool, minMessagePrice: Int64?, starStats: StarStats?, isAdmin: Bool, defaultSendAs: EnginePeer.Id?, isUnifiedStream: Bool) { self.isExpanded = isExpanded self.isEmpty = isEmpty self.hasUnseenMessages = hasUnseenMessages @@ -129,6 +130,7 @@ final class StoryItemContentComponent: Component { self.starStats = starStats self.isAdmin = isAdmin self.defaultSendAs = defaultSendAs + self.isUnifiedStream = isUnifiedStream } } @@ -238,7 +240,8 @@ final class StoryItemContentComponent: Component { minMessagePrice: mediaStreamCallState?.minMessagePrice, starStats: starStats, isAdmin: mediaStreamCallState?.isAdmin ?? false, - defaultSendAs: mediaStreamCallState?.defaultSendAs + defaultSendAs: mediaStreamCallState?.defaultSendAs, + isUnifiedStream: mediaStreamCallState?.isUnifiedStream ?? false ) } diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift index 8aef438878..3994d1946c 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift @@ -3009,7 +3009,8 @@ public final class StoryItemSetContainerComponent: Component { isEnabled: liveChatStateValue.areMessagesEnabled, isExpanded: liveChatStateValue.isExpanded, isEmpty: liveChatStateValue.isEmpty, - hasUnseenMessages: liveChatStateValue.hasUnseenMessages + hasUnseenMessages: liveChatStateValue.hasUnseenMessages, + isUnifiedStream: liveChatStateValue.isUnifiedStream ) starStats = liveChatStateValue.starStats.flatMap { starStats in return MessageInputPanelComponent.StarStats(