New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display sync status in favicon and title. #221

Merged
merged 2 commits into from Mar 16, 2016

Conversation

Projects
None yet
2 participants
@aviraldg
Collaborator

aviraldg commented Mar 16, 2016

No description provided.

Display sync status in favicon and title
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("×");

This comment has been minimized.

@ara4n

ara4n Mar 16, 2016

Member

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

if(state === "ERROR") {
this.favicon.badge("×");
document.title = "Vector [ERROR]";

This comment has been minimized.

@ara4n

ara4n Mar 16, 2016

Member

I suggest [offline] rather than the scarier looking [ERROR] :)

@ara4n

This comment has been minimized.

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

This comment has been minimized.

Collaborator

aviraldg commented Mar 16, 2016

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

@ara4n

This comment has been minimized.

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

Merge pull request #221 from aviraldg/feature-sync-status
Display sync status in favicon and title.

@ara4n ara4n merged commit 6016ba7 into matrix-org:develop Mar 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment