not-matthias / refined-twitch

Browser extension that allows you to remove distractions from Twitch.
GNU General Public License v3.0
0 stars 0 forks source link

Side Nav doesn't work persistently #7

Closed not-matthias closed 3 years ago

not-matthias commented 3 years ago

The side bar will not be hidden forever.

How to reproduce:

Result: The side nav will be shown again once the recommended items will be shown again

not-matthias commented 3 years ago

I think the nth-child css attribute could be the cause of it.

Edit: NOPE

not-matthias commented 3 years ago

After some debugging, I've found the problem. It's in the options menu. We are using multiple treeview elements.

So when we first set Hide Followed Channels, the following will be sent to content.ts:

[0]

When we open the options menu again, the same thing will be sent.

Now if we enable Hide Channels another id will be sent. The id of the Home treeview. So the following will be sent to content.ts:

[7]

The content script now believes, that 0 has been disabled and 7 enabled.