Skip to content

Commit

Permalink
fix: designate pasteboard operations as public
Browse files Browse the repository at this point in the history
  • Loading branch information
joonchrislee committed Sep 21, 2022
1 parent 6beab30 commit d80d16d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/TokenTextView/TokenTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,17 @@ public class TokenTextView: UITextView {

// MARK: Pasteboard operations

override func cut(_ sender: Any?) {
public override func cut(_ sender: Any?) {
copyTokens()
super.cut(sender)
}

override func copy(_ sender: Any?) {
public override func copy(_ sender: Any?) {
copyTokens()
super.copy(sender)
}

override func paste(_ sender: Any?) {
public override func paste(_ sender: Any?) {
// Check that the currently copied tokens are relevant to this paste operation
guard pasteboardTokenInstances.filter({ UIPasteboard.general.string?.contains($0.0.token.name) ?? false }).count == pasteboardTokenInstances.count else {
pasteboardTokenInstances.removeAll()
Expand Down

0 comments on commit d80d16d

Please sign in to comment.