Add basic moderation actions, fix long-press miss bug#442
Add basic moderation actions, fix long-press miss bug#442francislavoie wants to merge 1 commit intotommyxchow:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
@tommyxchow any interest in this? 🤔 |
527032f to
dfa3590
Compare
|
@tommyxchow I just saw the 5.0 release, awesome! Any interest in this? It's still my two biggest requests, I'd love some basic moderation functionality, and the long-press to reply in a fast chat bug is very annoying! I keep replying to the wrong comment. |
hey @francislavoie thanks for this - will try to get to this sometime in the next few days (still a few things on my backlog and need to do some follow-up fixes on the v5 release). |
Closes #386 and #194
Forgive me, I've not tested this at all, I'm not a mobile developer so I don't have the dev environment set up for it. (I'm willing to help test if you're able to send me an Android .apk though!)
I've been using Frosty for quite a while now, and I love it. But I've really been missing the lack of moderation actions when I use it. I figured I'd take a shot at implementing it.
I have zero Dart experience, so I heavily used Github Copilot to write the necessary changes.
I've reviewed the Twitch Helix API docs to make sure the API usage makes sense.
I assume users would need to log out and back in to get the new scopes to actually be able to get the moderation actions. I think
getModeratedChannels()should probably return an empty list (to safely just hide the moderation actions if the scope isn't given) instead of throwing an error, but an error message should probably still be logged. I don't know the best way to handle that, so I'll leave that up to you.While I was at it, a minor bug that's been annoying me is long-pressing on a message (which I do typically to reply to someone), it would often miss if someone else types at the same time, and the long-press menu chooses the user that's under the tap after scrolling. So to fix this, we can use
GestureDetectorto pause scrolling while long pressing (and unpause at end of longpress/cancel if was autoscrolling before starting the longpress). This changes from an InkWell to a GestureDetector with an InkWell child which might have side effects (again, entirely untested!) so that needs to be tested. The child InkWell should retain the ripple effect behaviour as before. 🤞