diff --git a/README.md b/README.md
index 811f52f2b8..a15917a475 100644
--- a/README.md
+++ b/README.md
@@ -22,14 +22,27 @@ into the `vector` directory and run your own server.
Development
===========
-You can work on any of the source files within Vector with the setup above,
-and your changes will cause an instant rebuild. If you also need to make
-changes to the react sdk, you can:
-1. Link the react sdk package into the example:
+For simple tweaks, you can work on any of the source files within Vector with the
+setup above, and your changes will cause an instant rebuild.
+
+However, all serious development on Vector happens on the `develop` branch. This typically
+depends on the `develop` snapshot versions of `matrix-react-sdk` and `matrix-js-sdk`
+too, which isn't expressed in Vector's `package.json`. To do this, check out
+the `develop` branches of these libraries and then use `npm link` to tell Vector
+about them:
+
+1. `git clone git@github.com:matrix-org/matrix-react-sdk.git`
+2. `cd matrix-react-sdk`
+3. `git checkout develop`
+4. `npm install`
+5. `npm start` (to start the dev rebuilder)
+6. `cd ../vector-web`
+7. Link the react sdk package into the example:
`npm link path/to/your/react/sdk`
-2. Start the development rebuilder in your react SDK directory:
- `npm start`
+
+Similarly, you may need to `npm link path/to/your/js/sdk` in your `matrix-react-sdk`
+directory.
If you add or remove any components from the Vector skin, you will need to rebuild
the skin's index by running, `npm run reskindex`.
diff --git a/src/ContextualMenu.js b/src/ContextualMenu.js
index cdfff952bb..7865e45a75 100644
--- a/src/ContextualMenu.js
+++ b/src/ContextualMenu.js
@@ -49,15 +49,25 @@ module.exports = {
var position = {
top: props.top - 20,
- right: props.right + 8,
};
+ var chevron = null;
+ if (props.left) {
+ chevron =
+ position.left = props.left + 8;
+ } else {
+ chevron =
+ position.right = props.right + 8;
+ }
+
+ var className = 'mx_ContextualMenu_wrapper';
+
// FIXME: If a menu uses getDefaultProps it clobbers the onFinished
// property set here so you can't close the menu from a button click!
var menu = (
-
+
-
+ {chevron}
diff --git a/src/controllers/organisms/RoomList.js b/src/controllers/organisms/RoomList.js
index c715faade5..03a1bfcd18 100644
--- a/src/controllers/organisms/RoomList.js
+++ b/src/controllers/organisms/RoomList.js
@@ -33,6 +33,7 @@ module.exports = {
cli.on("Room", this.onRoom);
cli.on("Room.timeline", this.onRoomTimeline);
cli.on("Room.name", this.onRoomName);
+ cli.on("RoomState.events", this.onRoomStateEvents);
var rooms = this.getRoomList();
this.setState({
@@ -66,6 +67,7 @@ module.exports = {
MatrixClientPeg.get().removeListener("Room", this.onRoom);
MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
+ MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
}
},
@@ -110,6 +112,11 @@ module.exports = {
this.refreshRoomList();
},
+ onRoomStateEvents: function(ev, state) {
+ setTimeout(this.refreshRoomList, 0);
+ },
+
+
refreshRoomList: function() {
var rooms = this.getRoomList();
this.setState({
diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js
index 29933d4ad8..21027cbfa8 100644
--- a/src/controllers/organisms/RoomView.js
+++ b/src/controllers/organisms/RoomView.js
@@ -63,6 +63,7 @@ module.exports = {
MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
MatrixClientPeg.get().removeListener("RoomMember.typing", this.onRoomMemberTyping);
+ MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
}
},
@@ -356,23 +357,20 @@ module.exports = {
},
getEventTiles: function() {
- var tileTypes = {
- 'm.room.message': sdk.getComponent('molecules.MessageTile'),
- 'm.room.member' : sdk.getComponent('molecules.EventAsTextTile'),
- 'm.call.invite' : sdk.getComponent('molecules.EventAsTextTile'),
- 'm.call.answer' : sdk.getComponent('molecules.EventAsTextTile'),
- 'm.call.hangup' : sdk.getComponent('molecules.EventAsTextTile'),
- 'm.room.topic' : sdk.getComponent('molecules.EventAsTextTile'),
- };
-
var DateSeparator = sdk.getComponent('molecules.DateSeparator');
var ret = [];
var count = 0;
+ var EventTile = sdk.getComponent('molecules.EventTile');
+
for (var i = this.state.room.timeline.length-1; i >= 0 && count < this.state.messageCap; --i) {
var mxEv = this.state.room.timeline[i];
- var TileType = tileTypes[mxEv.getType()];
+
+ if (!EventTile.supportsEventType(mxEv.getType())) {
+ continue;
+ }
+
var continuation = false;
var last = false;
var dateSeparator = null;
@@ -401,13 +399,12 @@ module.exports = {
if (i === 1) { // n.b. 1, not 0, as the 0th event is an m.room.create and so doesn't show on the timeline
var ts1 = this.state.room.timeline[i].getTs();
- dateSeparator = ;
+ dateSeparator =