Skip to content

Commit

Permalink
FIX data convention bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradSun committed Sep 10, 2023
1 parent 5c38877 commit af594f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions PasteShow/ContentsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct ContentsView: View {
func getPlainTextView(text: String) -> some View {
GeometryReader(content: { geometry in
Text(text)
.padding(.leading, 4)
Spacer()
.frame(width: geometry.size.width)
})
Expand Down
4 changes: 3 additions & 1 deletion PasteShow/PasteboardManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ class PasteboardManager {
sourceURL = frontApp.bundleURL
}

let utType = UTType(pasteboard.pasteboardItems!.first!.types.first!.rawValue) ?? .item
let pasteType = pasteboard.pasteboardItems?.first?.types.first?.rawValue
let utType = UTType(pasteType ?? "public.item") ?? .item

switch utType {
case .text, .plainText, .rtf, .rtfd, .utf8PlainText:
itemType = .Text
Expand Down

0 comments on commit af594f0

Please sign in to comment.