From bfbb7a661efed157de3fe4530c14d15ad9c75bb7 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 18 Mar 2016 19:45:04 +0000 Subject: [PATCH] special case to include kicked rooms as per https://github.com/vector-im/vector-web/issues/308 --- src/components/structures/ScrollPanel.js | 2 +- src/components/views/rooms/RoomList.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 129cbd4581..9b85854016 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -19,7 +19,7 @@ var ReactDOM = require("react-dom"); var GeminiScrollbar = require('react-gemini-scrollbar'); var q = require("q"); -var DEBUG_SCROLL = true; +var DEBUG_SCROLL = false; if (DEBUG_SCROLL) { // using bind means that we get to keep useful line numbers in the console diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 9a7396097f..ee74f30673 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -194,6 +194,10 @@ module.exports = React.createClass({ if (me && me.membership == "invite") { s.lists["im.vector.fake.invite"].push(room); } + // XXX: somewhat hacky gut-wrenching to special-case kicks + else if (me && me.membership === "leave" && me.events.member.getPrevContent().membership === "join") { + s.lists["im.vector.fake.recent"].push(room); + } else if (me && me.membership === "leave") { s.lists["im.vector.fake.archived"].push(room); }