mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Fix panel while live chat is loading
This commit is contained in:
@@ -1074,7 +1074,7 @@ public final class MessageInputPanelComponent: Component {
|
|||||||
strings: component.strings,
|
strings: component.strings,
|
||||||
chatPeerId: component.chatLocation?.peerId ?? component.context.account.peerId,
|
chatPeerId: component.chatLocation?.peerId ?? component.context.account.peerId,
|
||||||
inlineActions: inlineActions,
|
inlineActions: inlineActions,
|
||||||
leftAction: ChatTextInputPanelComponent.LeftAction(kind: .toggleExpanded(isVisible: component.liveChatState?.isEnabled == true, isExpanded: component.liveChatState?.isExpanded ?? true && component.liveChatState?.isEmpty == false, hasUnseen: component.liveChatState?.hasUnseenMessages ?? false), action: { [weak self] in
|
leftAction: ChatTextInputPanelComponent.LeftAction(kind: .toggleExpanded(isVisible: component.liveChatState == nil || component.liveChatState?.isEnabled == true, isExpanded: component.liveChatState?.isExpanded ?? true && component.liveChatState?.isEmpty == false, hasUnseen: component.liveChatState?.hasUnseenMessages ?? false), action: { [weak self] in
|
||||||
guard let self, let component = self.component else {
|
guard let self, let component = self.component else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1091,8 +1091,8 @@ public final class MessageInputPanelComponent: Component {
|
|||||||
rightAction: rightAction,
|
rightAction: rightAction,
|
||||||
sendAsConfiguration: component.liveChatState?.isEnabled == true ? sendAsConfiguration : nil,
|
sendAsConfiguration: component.liveChatState?.isEnabled == true ? sendAsConfiguration : nil,
|
||||||
//TODO:localize
|
//TODO:localize
|
||||||
placeholder: component.liveChatState?.isEnabled == true ? placeholder : "Comments are disabled",
|
placeholder: (component.liveChatState == nil || component.liveChatState?.isEnabled == true) ? placeholder : "Comments are disabled",
|
||||||
isEnabled: component.liveChatState?.isEnabled == true,
|
isEnabled: (component.liveChatState == nil || component.liveChatState?.isEnabled == true),
|
||||||
paidMessagePrice: component.sendPaidMessageStars,
|
paidMessagePrice: component.sendPaidMessageStars,
|
||||||
sendColor: component.sendPaidMessageStars.flatMap { value in
|
sendColor: component.sendPaidMessageStars.flatMap { value in
|
||||||
let params = LiveChatMessageParams(appConfig: component.context.currentAppConfiguration.with({ $0 }))
|
let params = LiveChatMessageParams(appConfig: component.context.currentAppConfiguration.with({ $0 }))
|
||||||
|
|||||||
Reference in New Issue
Block a user