mirror of
https://github.com/yattee/yattee.git
synced 2024-11-12 17:18:22 +00:00
Remove favorites drag opacity effect on iOS (fixes #43)
No workaround for how to handle drag and drop effect on opening context menu
This commit is contained in:
parent
984e9e7b16
commit
1fbb0cfa80
@ -49,20 +49,22 @@ struct FavoriteItemView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.opacity(dragging?.id == item.id ? 0.5 : 1)
|
#if os(macOS)
|
||||||
.onAppear {
|
.opacity(dragging?.id == item.id ? 0.5 : 1)
|
||||||
resource?.addObserver(store)
|
#endif
|
||||||
resource?.load()
|
.onAppear {
|
||||||
}
|
resource?.addObserver(store)
|
||||||
|
resource?.load()
|
||||||
|
}
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
.onDrag {
|
.onDrag {
|
||||||
dragging = item
|
dragging = item
|
||||||
return NSItemProvider(object: item.id as NSString)
|
return NSItemProvider(object: item.id as NSString)
|
||||||
}
|
}
|
||||||
.onDrop(
|
.onDrop(
|
||||||
of: [UTType.text],
|
of: [UTType.text],
|
||||||
delegate: DropFavorite(item: item, favorites: $favorites, current: $dragging)
|
delegate: DropFavorite(item: item, favorites: $favorites, current: $dragging)
|
||||||
)
|
)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user