ensure local activity bumps rooms up the roomlist

pull/972/head
Matthew Hodgson 2016-02-19 02:09:04 +00:00
parent f538a0d5de
commit 3910877f8f
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ var DropTarget = require('react-dnd').DropTarget;
var sdk = require('matrix-react-sdk')
var dis = require('matrix-react-sdk/lib/dispatcher');
var Unread = require('matrix-react-sdk/lib/Unread');
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
// turn this on for drop & drag console debugging galore
var debug = false;
@ -117,7 +118,9 @@ var RoomSubList = React.createClass({
tsOfNewestEvent: function(room) {
for (var i = room.timeline.length - 1; i >= 0; --i) {
var ev = room.timeline[i];
if (Unread.eventTriggersUnreadCount(ev)) {
if (Unread.eventTriggersUnreadCount(ev) ||
ev.sender.userId === MatrixClientPeg.get().credentials.userId)
{
return ev.getTs();
}
}