Fix bug where script policy controls get wonky when there are many on screen

This commit is contained in:
James Magahern
2020-09-21 15:39:25 -07:00
parent c6a27b3fd9
commit f9ddf24430

View File

@@ -166,6 +166,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
listCell.policyControl.policyStatus = .blocked
}
listCell.policyControl.removeTarget(nil, action: nil, for: .valueChanged)
listCell.policyControl.addAction(UIAction(handler: { _ in
let allowed: Bool = listCell.policyControl.policyStatus == .allowed