Repository navigation
Add a countdown for slow mode and timeouts - #6782
Conversation
0287f48 to
24c94a0
Compare
pajlada
left a comment
There was a problem hiding this comment.
Initial quick review, haven't tested the functionality
917e006 to
bd6cea3
Compare
21ba781 to
31cde74
Compare
I'm not entirely sure how to resolve that. I tried using a vbox but that ends up increasing the height of the input box a lot when neither label is showing anything, and that looked odd to me. The message length label could be swapped to the other side of the timer label, but then the timer label would have the same issue. |
When no timeout is active, you can hide the label, then the space will be gone. The timeout label and message length label also use a different font. |
31cde74 to
c19e8cd
Compare
I see. I've implemented that now. |
pajlada
left a comment
There was a problem hiding this comment.
As you mentioned, we can't easily receive an untimeout event for ourselves, but it would be good to clear the timer after we've detected a successful message from ourselves that's sent, or a user could be stuck with a 14d timer.
I've tested it now and apart from the above & the review comments, this looks good to me.
7e8e992 to
71cd115
Compare
I changed this so that the timer starts/resets whenever we see a message from the user in the channel. This should resolve the untimeout issue. I think this also resolves the automod issue as well. |
71cd115 to
3d31a64
Compare
pajlada
left a comment
There was a problem hiding this comment.
Just this then I'm good to merge
Adds 'components' to FormatTime to control how many most significant components the formatted time will have.
When the user may be unable to send a message because they have been timed out or the channel is in slow mode, it can be helpful to show to the user how much time is remaining before they can chat again.
If a twitch channel is in slow mode, after a message from the user is sent by the channel, start the countdown timer to show the user how much time is remaining before they can chat again.
If the user has been timed out in a channel, start the countdown timer to show the user how much time is remaining before they can chat again.
3d31a64 to
07e49b8
Compare
When a channel is in slow mode or a user is timed out, it is useful to know how long the user needs to wait before they are able to chat again. This does not prevent sending messages, it only counts down in a UI element to inform the user.
Showing the timer is controlled with a new setting that defaults to off.
There are a few situations I found where the timer is not accurate, and probably others that I didn't check for:
Loosely based on/inspired by #3329