Skip to content

Commit

Permalink
fix: pointer for yc links
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrighetti committed Nov 4, 2023
1 parent 1b2776a commit 1e65aec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Binary file not shown.
9 changes: 6 additions & 3 deletions HNReader/View/ItemCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ struct ItemCell: View {
}
.frame(width: 50, height: 50)
.onHover { isHovered in
guard item?.url == nil else { return }
DispatchQueue.main.async {
if (isHovered) {
NSCursor.operationNotAllowed.push()
if item?.url == nil {
NSCursor.operationNotAllowed.push()
} else {
NSCursor.pointingHand.push()
}
} else {
NSCursor.pop()
}
Expand All @@ -113,7 +116,7 @@ struct ItemCell: View {
}.padding(.leading)
}
.padding()
.background(colorScheme == .dark ? Color.black.opacity(0.3) : Color.white)
.background(colorScheme == .dark ? Color.black.opacity(0.3) : Color.gray.opacity(0.1))
.cornerRadius(10)
.onAppear {
if item == nil {
Expand Down

0 comments on commit 1e65aec

Please sign in to comment.