Skip to content

Commit

Permalink
Merge pull request #4250 from Expensify/horus-remove-new-message-afte…
Browse files Browse the repository at this point in the history
…r-logout
  • Loading branch information
deetergp authored Jul 28, 2021
2 parents bd23235 + 62bf8f5 commit a2888f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import CONFIG from '../../../CONFIG';
*/
function updateUnread(totalCount) {
const hasUnread = totalCount !== 0;
document.title = hasUnread ? `(NEW!) ${CONFIG.SITE_TITLE}` : CONFIG.SITE_TITLE;
document.title = hasUnread ? `(${totalCount}) ${CONFIG.SITE_TITLE}` : CONFIG.SITE_TITLE;
document.getElementById('favicon').href = hasUnread ? CONFIG.FAVICON.UNREAD : CONFIG.FAVICON.DEFAULT;
}

Expand Down
3 changes: 2 additions & 1 deletion src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const defaultProps = {
class SignInPage extends Component {
componentDidMount() {
// Always reset the unread counter to zero on this page
updateUnread(0);
// NOTE: We need to wait for the next tick to ensure that the unread indicator is updated
setTimeout(() => updateUnread(0), 0);
}

render() {
Expand Down

0 comments on commit a2888f7

Please sign in to comment.