Fix copy protection setup

This commit is contained in:
Ilya Laktyushin 2021-11-12 20:37:34 +04:00
parent af090c5ceb
commit 4930778807

View File

@ -1228,7 +1228,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
}
if let updatedCopyProtection = state.forwardingEnabled {
toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: updatedCopyProtection).start())
toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: !updatedCopyProtection).start())
}
if let updatedAddressNameValue = updatedAddressNameValue {
@ -1308,7 +1308,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
}
if let updatedCopyProtection = state.forwardingEnabled {
toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: updatedCopyProtection).start())
toggleCopyProtectionDisposable.set(context.engine.peers.toggleMessageCopyProtection(peerId: peerId, enabled: !updatedCopyProtection).start())
}
if let updatedAddressNameValue = updatedAddressNameValue {