Skip to content

Commit

Permalink
fixes #6891
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Jun 17, 2024
1 parent 088113b commit 2daca52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/hide_sidebar_elements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import watcher from '../../watcher.js';
import styles from './styles.module.css';

const sidebarSectionSelector = '.side-nav-section';
const offlineChannelSelector = '.side-nav-card > .side-nav-card__link--offline';
const offlineChannelSelector = '.side-nav-card';

let offlineChannelObserverRemover = null;
let sidebarSectionObserverRemover = null;
Expand Down Expand Up @@ -89,7 +89,10 @@ class HideSidebarElementsModule {
if (!isConnected) {
return;
}
node.classList.add(styles.hideOfflineChannel);
const offlineAvatars = node.querySelectorAll('.side-nav-card__avatar--offline');
for (const offlineAvatar of offlineAvatars) {
offlineAvatar.closest('.side-nav-card')?.classList.add(styles.hideOfflineChannel);
}
});
}

Expand Down

0 comments on commit 2daca52

Please sign in to comment.