Skip to content

Conversation

@maksPodstawski
Copy link
Member

@maksPodstawski maksPodstawski commented Aug 10, 2025

Description

Briefly explain what this PR does. Is it a bug fix, new feature, or a refactor?

Testing

Select all the environments you tested this PR with:

  • BetterTTV (BTTV)
  • FrankerFaceZ (FFZ)
  • 7TV
  • Native Twitch

Please describe how you tested this change in the selected environments.

Related Issues

If this PR addresses an issue, link it here (e.g., Closes #123).

Description by Callstackai

This PR refactors the createIndividualChattersComponents method to replace a waiting mechanism with a fixed delay, improving the handling of chatters rendering.

Diagrams of code changes
sequenceDiagram
    participant M as ChattersModule
    participant DOM as DOM Elements
    participant C as ChattersComponent
    participant API as Chatters API

    M->>M: createIndividualChattersComponents(elements)
    Note over M: Delay 300ms
    
    loop For each root element
        M->>DOM: Get filtered indicators
        loop For each indicator
            M->>M: Find username from indicator
            M->>M: Create/Get counter for username
            M->>DOM: Create/Get wrapper span
            M->>C: Render ChattersComponent
        end
    end

    M->>M: Filter logins with loading value
    alt Has loading logins
        M->>API: refreshChatters(loadingLogins)
    end
Loading
Files Changed
FileSummary
src/platforms/twitch/modules/chatters/chatters.module.tsxRefactored the createIndividualChattersComponents method to use a fixed delay instead of a waiting function.

@igorovh igorovh merged commit bdfca06 into master Aug 10, 2025
2 checks passed
@igorovh igorovh deleted the fix/multi-chatters branch August 10, 2025 20:12
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.

3 participants