Commit 7ec6a057 authored by JC Brand's avatar JC Brand

Fixes #1379 No longer an indication of unread messages in MUC

parent d5e89655
......@@ -8,6 +8,7 @@
- #1374 Can't load embedded chat when changing `view_mode` between page reloads
- #1376 Fixed some alignment issues in the sidebar
- #1378 Message Delivery Receipts were being sent for carbons and own messages
- #1379 MUC unread messages indicator is failing
## 4.0.6 (2018-12-07)
......
......@@ -11284,6 +11284,8 @@ body.reset {
text-shadow: 0 1px 0 var(--text-shadow-color);
word-wrap: break-word;
height: 2.5em; }
#conversejs .items-list .list-item.unread-msgs {
font-weight: bold; }
#conversejs .items-list .list-item .list-item-link {
color: var(--list-item-link-color);
margin: auto;
......
......@@ -28,6 +28,10 @@
word-wrap: break-word;
height: 2.5em;
&.unread-msgs {
font-weight: bold;
}
.list-item-link {
color: var(--list-item-link-color);
&:hover {
......
......@@ -277,6 +277,7 @@
allow_bookmarks: false // Makes testing easier, otherwise we have to mock stanza traffic.
}, async function (done, _converse) {
test_utils.openControlBox();
const room_jid = 'kitchen@conference.shakespeare.lit';
await test_utils.waitUntil(() => !_.isUndefined(_converse.rooms_list_view), 500);
await test_utils.openAndEnterChatRoom(_converse, 'kitchen', 'conference.shakespeare.lit', 'romeo');
......@@ -292,9 +293,10 @@
type: 'groupchat'
}).c('body').t('foo').tree());
await new Promise((resolve, reject) => view.once('messageInserted', resolve));
// If the user isn't mentioned, the counter doesn't get incremented, but the text of the groupchat is bold
let room_el = _converse.rooms_list_view.el.querySelector(".available-chatroom");
expect(_.includes(room_el.classList, 'unread-msgs'));
expect(_.includes(room_el.classList, 'unread-msgs')).toBeTruthy();
// If the user is mentioned, the counter also gets updated
view.model.onMessage(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment