Browse Source

add hiding of twists' counters in DMs on mark-all-as-read event

readme-update
Simon Grim 8 years ago
parent
commit
cf814dfd18
  1. 6
      js/twister_directmsg.js

6
js/twister_directmsg.js

@ -179,13 +179,14 @@ function openCommonDMsModal() { @@ -179,13 +179,14 @@ function openCommonDMsModal() {
modal.self.find('.mark-all-as-read')
.css('display', 'inline')
.attr('title', polyglot.t('Mark all as read'))
.on('click', function() {
.on('click', function (event) {
for (var user in _newDMsPerUser) {
if (user[0] !== '*')
_newDMsPerUser[user] = 0;
}
saveDMsToStorage();
$.MAL.updateNewDMsUI(getNewDMsCount());
$(event.target).closest('.directMessages').find('.direct-messages-list .messages-qtd').hide();
})
;
}
@ -236,13 +237,14 @@ function openGroupMessagesModal(groupAlias) { @@ -236,13 +237,14 @@ function openGroupMessagesModal(groupAlias) {
modal.self.find('.mark-all-as-read')
.css('display', 'inline')
.attr('title', polyglot.t('Mark all as read'))
.on('click', function() {
.on('click', function (event) {
for (var user in _newDMsPerUser) {
if (user[0] === '*')
_newDMsPerUser[user] = 0;
}
saveDMsToStorage();
$.MAL.updateNewGroupDMsUI(getNewGroupDMsCount());
$(event.target).closest('.groupMessages').find('.direct-messages-list .messages-qtd').hide();
})
;
} else {

Loading…
Cancel
Save