diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index dbfe95dadf..636000c175 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -152,7 +152,11 @@ module.exports = React.createClass({ if (typeof newSize === "string") { newSize = Number.MAX_SAFE_INTEGER; } - this.subListSizes[id] = newSize; + if (newSize === null) { + delete this.subListSizes[id]; + } else { + this.subListSizes[id] = newSize; + } window.localStorage.setItem("mx_roomlist_sizes", JSON.stringify(this.subListSizes)); // update overflow indicators this._checkSubListsOverflow(); @@ -716,4 +720,4 @@ module.exports = React.createClass({ ); }, -}); \ No newline at end of file +}); diff --git a/src/resizer/item.js b/src/resizer/item.js index 8b5b7ead44..13932f9170 100644 --- a/src/resizer/item.js +++ b/src/resizer/item.js @@ -77,5 +77,9 @@ export default class ResizeItem { clearSize() { this.sizer.clearItemSize(this.domNode); + const callback = this.resizer.distributorCtor.onResized; + if (callback) { + callback(null, this.id, this.domNode); + } } } diff --git a/src/resizer/room.js b/src/resizer/room.js index d56816e711..59f47f31fc 100644 --- a/src/resizer/room.js +++ b/src/resizer/room.js @@ -98,7 +98,7 @@ class RoomDistributor { // while (nextItem) // } - if (false && interactive) { + if (interactive) { const nextItem = this.item.next(); if (nextItem) { // let item = nextItem; @@ -124,6 +124,7 @@ class RoomDistributor { item = item.previous(); } else if (size <= MIN_SIZE) { + // console.log(" - resizing", item.id, "to min size", MIN_SIZE); item.setSize(MIN_SIZE); const remainder = MIN_SIZE - size; item = item.previous(); @@ -134,6 +135,7 @@ class RoomDistributor { else { const contentSize = this._contentSize(item); if (size > contentSize) { + // console.log(" - resizing", item.id, "to contentSize", contentSize); item.setSize(contentSize); const remainder = size - contentSize; item = item.previous(); @@ -142,12 +144,14 @@ class RoomDistributor { } } else { + // console.log(" - resizing", item.id, "to size", size); item.setSize(size); item = null; size = 0; } } } + // console.log("*** ending resize session"); } resizeFromContainerOffset(containerOffset) {