Fix a retain cycle for story toggle buttons

This commit is contained in:
Jordan Rose 2022-08-18 15:59:28 -07:00
parent 7208776b44
commit ced6589bec

View File

@ -114,7 +114,7 @@ class StoryGroupRepliesAndViewsSheet: InteractiveSheetViewController {
func createToggleButton(title: String, block: @escaping () -> Void) -> UIButton {
let button = OWSButton()
button.block = {
button.block = { [unowned button] in
guard !button.isSelected else { return }
block()
}