Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable hold to peek delay #1699

Open
Kommynct opened this issue Feb 17, 2025 · 1 comment
Open

configurable hold to peek delay #1699

Kommynct opened this issue Feb 17, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@Kommynct
Copy link

Is Your Feature Request Related to a Problem?

Right now holding to peek takes twice as long as it should

Feature Description

I'd like to be able to configure the long-press delay

Alternative Solutions

A much shorter delay would be good for me but bad for accessibility, making it configurable makes everyone happy!

Additional Context

No response

@Kommynct Kommynct added the enhancement New feature or request label Feb 17, 2025
@micahmo
Copy link
Member

micahmo commented Feb 17, 2025

Just a dev note here: for image peeking, we are just implementing onLongPressStart, which I assume uses the default long-press duration for Flutter and/or Android. So I assume we'd have to do some digging around in order to customize this.

onLongPressStart: (_) {
_overlayEntry = OverlayEntry(
builder: (context) {
return FadeTransition(
opacity: _overlayAnimationController,
child: ImageViewer(
url: widget.postViewMedia.media.first.thumbnailUrl ?? widget.postViewMedia.media.first.mediaUrl,
postId: widget.postViewMedia.postView.post.id,
navigateToPost: widget.navigateToPost,
isPeek: true,
),
);
},
);
Overlay.of(context).insert(_overlayEntry!);
_overlayAnimationController.forward();
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants