From b5c9d99424b269d291973e09c8311bbae3537596 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 22 Sep 2014 17:42:53 +0100 Subject: Show display name changes in the message list. --- webclient/room/room.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'webclient/room/room.html') diff --git a/webclient/room/room.html b/webclient/room/room.html index db3aa193c5..c807e2afe1 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -77,10 +77,10 @@
- + {{ members[msg.state_key].displayname || msg.state_key }} joined - + {{ members[msg.state_key].displayname || msg.state_key }} left @@ -93,7 +93,8 @@ - + {{ members[msg.user_id].displayname || msg.user_id }} {{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }} {{ members[msg.state_key].displayname || msg.state_key }} @@ -101,6 +102,9 @@ : {{ msg.content.reason }} + + {{ msg.user_id }} changed their display name from {{ msg.prev_content.displayname }} to {{ msg.content.displayname }} + Date: Tue, 23 Sep 2014 16:53:27 +0100 Subject: Fix SYWEB-72 : Improve performance when typing. Swapped ng-keydown to a directive, which does the same thing (check if up/down arrow then call history.goUp/goDown). This has *dramatically* improved performance when typing in rooms which have lots (>100) of messages loaded. --- webclient/room/room-directive.js | 15 +++++++++++++++ webclient/room/room.html | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'webclient/room/room.html') diff --git a/webclient/room/room-directive.js b/webclient/room/room-directive.js index 8db4cb5d9a..d5108b5f1c 100644 --- a/webclient/room/room-directive.js +++ b/webclient/room/room-directive.js @@ -135,6 +135,21 @@ angular.module('RoomController') }); }; }]) +.directive('commandHistory', [ function() { + return function (scope, element, attrs) { + element.bind("keydown keypress", function (event) { + var keycodePressed = event.which; + var UP_ARROW = 38; + var DOWN_ARROW = 40; + if (keycodePressed === UP_ARROW) { + scope.history.goUp(event); + } + else if (keycodePressed === DOWN_ARROW) { + scope.history.goDown(event); + } + }); + } +}]) // A directive to anchor the scroller position at the bottom when the browser is resizing. // When the screen resizes, the bottom of the element remains the same, not the top. diff --git a/webclient/room/room.html b/webclient/room/room.html index c807e2afe1..2786246232 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -163,8 +163,7 @@