Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Display sync status in favicon and title. #221

Merged
merged 2 commits into from
Mar 16, 2016

Conversation

aviraldg
Copy link
Contributor

No description provided.

Signed-off-by: Aviral Dasgupta <me@aviraldg.com>
@@ -907,6 +907,11 @@ module.exports = React.createClass({
console.warn("Failed to set badge count: "+e.message);
}
document.title = "Vector"+(notifCount > 0 ? " ["+notifCount+"]" : "");

if(state === "ERROR") {
this.favicon.badge("×");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has to be in a try block, as per the previous this.favicon.badge()?

@ara4n
Copy link
Member

ara4n commented Mar 16, 2016

other than comments inline, this LGTM, thanks!

In future, if we get around to updating the badge count locally rather than basing it purely off the /sync results, then I suspect this should get backed out - as the unread count will still be meaningful and useful when offline (given the rest of Vector works fine offline)

@aviraldg
Copy link
Contributor Author

@ara4n This should be ready to go; doesn't hide the badge count anymore, instead uses colour to indicate status.

@ara4n
Copy link
Member

ara4n commented Mar 16, 2016

thanks! - just merging now. i'd prefer we stick with red badges for the count, but will switch to bright #f00 for the error state and #d00 for normal badge count.

ara4n added a commit that referenced this pull request Mar 16, 2016
Display sync status in favicon and title.
@ara4n ara4n merged commit 6016ba7 into matrix-org:develop Mar 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants