fix: align GIF picker tap hitboxes with visible thumbnails
Fix GIF picker grid tap hitbox selecting adjacent item by aligning GIF picker tap hitboxes with visible thumbnails. Co-authored-by: danieldaquino <24692108+danieldaquino@users.noreply.github.com> Changelog-Fixed: Fix GIF picker grid tap hitbox selecting adjacent item Closes: https://github.com/damus-io/damus/issues/3744 Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -92,6 +92,7 @@ struct GIFPickerView: View {
|
||||
], spacing: 4) {
|
||||
ForEach(viewModel.gifs) { gif in
|
||||
GIFThumbnailView(gif: gif, disable_animation: damus_state.settings.disable_animation)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if let gifURL = gif.mediumURL ?? gif.fullURL {
|
||||
onGIFSelected(gifURL)
|
||||
@@ -178,6 +179,7 @@ struct GIFThumbnailView: View {
|
||||
.frame(height: 120)
|
||||
.clipped()
|
||||
.cornerRadius(8)
|
||||
.kfClickable()
|
||||
} else {
|
||||
Rectangle()
|
||||
.fill(Color.secondary.opacity(0.2))
|
||||
|
||||
Reference in New Issue
Block a user