mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-19 21:00:10 +00:00
Fix
This commit is contained in:
parent
441b4ccc9f
commit
e56c3451c0
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user