Skip to content

Commit

Permalink
Bug: Allow MenuItemsSource conform to SwiftUI Views
Browse files Browse the repository at this point in the history
  • Loading branch information
nanashili committed Jun 22, 2024
1 parent ad537a1 commit a48e88b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// - Important: This protocol inherits from AnyObject, which means only class types can conform to it.
///
/// - Note: The implementing type is responsible for creating and returning an array of ``MenuItemProvider`` objects.
public protocol MenuItemsSource: AnyObject {
public protocol MenuItemsSource {
/// Provides an array of menu items for the given TextView.
///
/// - Parameter textView: The TextView requesting the menu items.
Expand Down
3 changes: 1 addition & 2 deletions Sources/AuroraEditorTextView/TextView/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import AppKit
import Version_Control

// Disabling file length and type body length as the methods and variables contained in this file cannot be moved
// to extensions.
Expand Down Expand Up @@ -202,7 +201,7 @@ public class TextView: NSView, NSTextContent {
}
}

weak var menuItemsSource: MenuItemsSource?
public var menuItemsSource: MenuItemsSource?

open var contentType: NSTextContentType?

Expand Down

0 comments on commit a48e88b

Please sign in to comment.