client: separate NEW vs NEW-PM titles, move user count to the end of the title

This commit is contained in:
mappu 2017-02-05 20:52:24 +13:00
parent 9060b87e94
commit 226e6751c6

View File

@ -765,10 +765,15 @@ var toggle_joinparts = function(ev) {
/* */
var updateTitle = function() {
document.title =
($(".unread").length ? "[NEW PM] " : "") +
"("+userlist.count()+") "+
hub_hubname;
var prefix = "";
var unrTabs = $(".unread");
if (unrTabs.length === 1 && unrTabs[0].getAttribute('data-tab') == "tab-main") {
prefix = "[NEW] "
} else if (unrTabs.length > 0) {
prefix = "[NEW PM] "
}
document.title = prefix + hub_hubname + "("+userlist.count()+") "
};
var sock = {};