Like/Dislike on ToggleIcons

Hello,
I'm building an app similar to TikTok or YTShorts and so far created a basic like/dislike system using 2 toggle icons (1 for likes and 1 for dislikes. By clicking one of them, I check the 'ThumbsUp' or 'ThumbsDown' list of a current video document and add or remove user reference from there. However, this way user can toggle both icons independently, which means that he likes and dislikes the video at the same time. Is there any way to toggle another widget with code or custom action?
For example: When user toggles like icon ON it automatically toggles dislike icon OFF.

Or maybe there is another, easier way of achieving this? The only thing I can think of right now is just hiding second icon when the first one is toggled, but I'd like to keep both of them visible.

Thanks in advance

2
5 replies