mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-03 19:54:31 +00:00
Fix disableSendAsButton
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
||||
|
||||
sgdeps = [
|
||||
"//Swiftgram/SGSimpleSettings:SGSimpleSettings"
|
||||
]
|
||||
|
||||
swift_library(
|
||||
name = "ChatPresentationInterfaceState",
|
||||
module_name = "ChatPresentationInterfaceState",
|
||||
@@ -9,7 +13,7 @@ swift_library(
|
||||
copts = [
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
deps = sgdeps + [
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import SGSimpleSettings
|
||||
import Foundation
|
||||
import UIKit
|
||||
import SwiftSignalKit
|
||||
@@ -719,8 +720,13 @@ public final class ChatPresentationInterfaceState: Equatable {
|
||||
self.reportReason = reportReason
|
||||
self.showCommands = showCommands
|
||||
self.hasBotCommands = hasBotCommands
|
||||
if SGSimpleSettings.shared.disableSendAsButton {
|
||||
self.showSendAsPeers = false
|
||||
self.sendAsPeers = nil
|
||||
} else {
|
||||
self.showSendAsPeers = showSendAsPeers
|
||||
self.sendAsPeers = sendAsPeers
|
||||
}
|
||||
self.botMenuButton = botMenuButton
|
||||
self.showWebView = showWebView
|
||||
self.currentSendAsPeerId = currentSendAsPeerId
|
||||
|
||||
Reference in New Issue
Block a user