Skip to content

pause chat while using mod slider#561

Closed
chipsTM wants to merge 2 commits into
SevenTV:masterfrom
chipsTM:feat/modslider-stop-scroll
Closed

pause chat while using mod slider#561
chipsTM wants to merge 2 commits into
SevenTV:masterfrom
chipsTM:feat/modslider-stop-scroll

Conversation

@chipsTM
Copy link
Copy Markdown
Contributor

@chipsTM chipsTM commented May 1, 2023

Adds option to pause the chat scroll while using the mod slider

);

const handleDown = (e: PointerEvent) => {
if (shouldPauseChat.value) scroller.pause();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nature of the pause should be retained so that the chat isn't unpaused by mod slider if it was already paused for a different reason. Check that scrolling wasn't already paused, then set a boolean ref to instruct whether to unpause later.

data.calculate(0);
(e.target as HTMLElement).releasePointerCapture(e.pointerId);

if (shouldPauseChat.value) scroller.unpause();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if the pause was triggered by the mod slider

@chipsTM
Copy link
Copy Markdown
Contributor Author

chipsTM commented May 11, 2023

the last commit pushed should resolve the concerns with checking if the chat was paused by the mod slider or not

@AnatoleAM
Copy link
Copy Markdown
Contributor

The issue with this change is that it risks creating conflicts in the future. Pausing chat must be extended, with something such as a reason field in order to avoid this.

Closing because this has been up for a long time but you are free to re-integrate this alongside a better pause method.

@AnatoleAM AnatoleAM closed this Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants