File tree Expand file tree Collapse file tree
WordPress/Classes/ViewRelated/Tips Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,11 +107,11 @@ extension UIViewController {
107107 _ tip: some Tip ,
108108 sourceItem: any UIPopoverPresentationControllerSourceItem ,
109109 arrowDirection: UIPopoverArrowDirection ? = nil ,
110- actionHandler: ( ( Tips . Action ) -> Void ) ? = nil
110+ actionHandler: ( @ MainActor @ Sendable ( Tips . Action ) -> Void ) ? = nil
111111 ) -> TipObserver ? {
112- let task = Task { @MainActor [ weak self] in
112+ let task = Task { @MainActor [ weak self, weak sourceItem ] in
113113 for await shouldDisplay in tip. shouldDisplayUpdates {
114- if shouldDisplay {
114+ if shouldDisplay, let sourceItem {
115115 let popoverController = TipUIPopoverViewController ( tip, sourceItem: sourceItem, actionHandler: actionHandler ?? { _ in } )
116116 popoverController. view. tintColor = . secondaryLabel
117117 if let arrowDirection {
You can’t perform that action at this time.
0 commit comments