mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
unseen chats bold in list
This commit is contained in:
parent
ec793efb26
commit
bca16598fd
@ -504,6 +504,10 @@ header #back-button {
|
|||||||
margin-right: 15px !important;
|
margin-right: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chat-item.has-unseen .text, .chat-item.has-unseen .name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.chat-item .text {
|
.chat-item .text {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
|
@ -961,12 +961,15 @@ function changeChatUnseenCount(pub, change) {
|
|||||||
chats[pub].unseen = 0;
|
chats[pub].unseen = 0;
|
||||||
}
|
}
|
||||||
unseenTotal = unseenTotal >= 0 ? unseenTotal : 0;
|
unseenTotal = unseenTotal >= 0 ? unseenTotal : 0;
|
||||||
var el = $('.chat-item[data-pub="' + pub +'"] .unseen');
|
var chatListEl = $('.chat-item[data-pub="' + pub +'"]');
|
||||||
|
var unseenCountEl = chatListEl.find('.unseen');
|
||||||
if (chats[pub].unseen > 0) {
|
if (chats[pub].unseen > 0) {
|
||||||
el.text(chats[pub].unseen);
|
chatListEl.addClass('has-unseen');
|
||||||
el.show();
|
unseenCountEl.text(chats[pub].unseen);
|
||||||
|
unseenCountEl.show();
|
||||||
} else {
|
} else {
|
||||||
el.hide();
|
chatListEl.removeClass('has-unseen');
|
||||||
|
unseenCountEl.hide();
|
||||||
}
|
}
|
||||||
setUnseenTotal();
|
setUnseenTotal();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user