From 09ec4a920cf50d73503f1fa7325cfb87c6592d70 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 14 Aug 2021 10:25:32 -0400 Subject: [PATCH] Fix retain cycle in ProfileViewController --- Tusker/Screens/Profile/ProfileViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Profile/ProfileViewController.swift b/Tusker/Screens/Profile/ProfileViewController.swift index c771d891..49df4883 100644 --- a/Tusker/Screens/Profile/ProfileViewController.swift +++ b/Tusker/Screens/Profile/ProfileViewController.swift @@ -70,8 +70,8 @@ class ProfileViewController: UIPageViewController { let composeButton = UIBarButtonItem(barButtonSystemItem: .compose, target: self, action: #selector(composeMentioning)) composeButton.menu = UIMenu(title: "", image: nil, identifier: nil, options: [], children: [ - UIAction(title: "Direct Message", image: UIImage(systemName: Status.Visibility.direct.unfilledImageName), identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { (_) in - self.composeDirectMentioning() + UIAction(title: "Direct Message", image: UIImage(systemName: Status.Visibility.direct.unfilledImageName), identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off, handler: { [weak self] (_) in + self?.composeDirectMentioning() }) ]) composeButton.isEnabled = mastodonController.loggedIn