-
Notifications
You must be signed in to change notification settings - Fork 226
Disable mutliple click (parallel or serial) on a room #4683
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
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4683 +/- ##
===========================================
+ Coverage 80.11% 80.13% +0.01%
===========================================
Files 2126 2126
Lines 56270 56269 -1
Branches 7014 7017 +3
===========================================
+ Hits 45081 45089 +8
+ Misses 8778 8768 -10
- Partials 2411 2412 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be handled directly in the compose layer? Would be simpler to handle this with a custom Modifier
so it can easily be reused (and tested?)
@@ -38,4 +38,8 @@ class FirstThrottler(private val minimumInterval: Long = 800) { | |||
// Too early | |||
return CanHandleResult.No(minimumInterval - delaySinceLast) | |||
} | |||
|
|||
fun canHandleAsBoolean(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call this canHandle
and the other one could be getResult
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have rewritten this class.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be handy to create a reusable Modifier
so we can use this everywhere more easily, but we can do later I guess.
I have thought about it, but I am not sure how to implement this, as the FirstThrottle is shared between several click handlers. |
Content
Add minimum delay between two click handling on the room list.
Protect:
Motivation and context
Fixes #4619
Screenshots / GIFs
Tests
Tested devices
Checklist