From 886ffbf158d2a843fc26a11213317b220a34c2da Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 6 Nov 2015 21:00:34 +0100 Subject: [PATCH] switch to m.* prefixes for tags before it's too late --- src/controllers/organisms/RoomList.js | 8 ++++---- src/skins/vector/views/molecules/RoomTile.js | 2 +- src/skins/vector/views/organisms/RoomList.js | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/controllers/organisms/RoomList.js b/src/controllers/organisms/RoomList.js index 38a0c652..3a03fb04 100644 --- a/src/controllers/organisms/RoomList.js +++ b/src/controllers/organisms/RoomList.js @@ -139,8 +139,8 @@ module.exports = { var me = room.getMember(MatrixClientPeg.get().credentials.userId); if (me && me.membership == "invite") { - s.lists["invites"] = s.lists["invites"] || []; - s.lists["invites"].push(room); + s.lists["m.invite"] = s.lists["m.invite"] || []; + s.lists["m.invite"].push(room); } else { var shouldShowRoom = ( @@ -172,8 +172,8 @@ module.exports = { } } else { - s.lists["recents"] = s.lists["recents"] || []; - s.lists["recents"].push(room); + s.lists["m.recent"] = s.lists["m.recent"] || []; + s.lists["m.recent"].push(room); } } } diff --git a/src/skins/vector/views/molecules/RoomTile.js b/src/skins/vector/views/molecules/RoomTile.js index 5be7ac4c..27c6bc12 100644 --- a/src/skins/vector/views/molecules/RoomTile.js +++ b/src/skins/vector/views/molecules/RoomTile.js @@ -77,7 +77,7 @@ var roomTileSource = { var newOrder= {}; if (item.targetList.props.order === 'manual') { - newOrder['order' = item.targetList.calcManualOrderTagData(item.room); + newOrder['order'] = item.targetList.calcManualOrderTagData(item.room); } // if we moved lists or the ordering changed, add the new tag diff --git a/src/skins/vector/views/organisms/RoomList.js b/src/skins/vector/views/organisms/RoomList.js index 98b1da54..9c67d905 100644 --- a/src/skins/vector/views/organisms/RoomList.js +++ b/src/skins/vector/views/organisms/RoomList.js @@ -44,7 +44,7 @@ module.exports = React.createClass({
{ expandButton } - - - - { Object.keys(self.state.lists).map(function(tagName) { - if (!tagName.match(/^(invites|favourite|recents|lowpriority|archived)$/)) { + if (!tagName.match(/^m\.(invite|favourite|recent|lowpriority|archived)$/)) { return