Skip to content

Commit

Permalink
Fix Show Message Buttons feature when switching conversations (#803)
Browse files Browse the repository at this point in the history
Fixes #580
  • Loading branch information
whitecrownclown authored and sindresorhus committed Mar 10, 2019
1 parent 3bb743d commit 766bd9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions css/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,12 @@ a._4ce_ { /* "Play a game" */
opacity: 1 !important;
filter: invert(0.66);
}

/* Toggle message buttons */
body ._4_j4 ._39bj {
display: none;
}

body.show-message-buttons ._4_j4 ._39bj {
display: flex;
}
3 changes: 1 addition & 2 deletions source/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ ipc.on('toggle-mute-notifications', async (_event: ElectronEvent, defaultStatus:
});

ipc.on('toggle-message-buttons', async () => {
const messageButtons = await elementReady('._39bj');
messageButtons.style.display = config.get('showMessageButtons') ? 'flex' : 'none';
document.body.classList.toggle('show-message-buttons', config.get('showMessageButtons'));
});

ipc.on('show-active-contacts-view', () => {
Expand Down

0 comments on commit 766bd9f

Please sign in to comment.