From 3910877f8f81a065f6a3529d3f7612b82fe3a336 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 19 Feb 2016 02:09:04 +0000 Subject: [PATCH] ensure local activity bumps rooms up the roomlist --- src/components/structures/RoomSubList.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index f18b149f..b2292a78 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -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(); } }