From ca0ad0b7ed4603d7b7b0d46c892343fda3856af7 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 14 Sep 2020 14:03:51 +0100 Subject: [PATCH 1/4] Don't count widgets which no longer exist towards pinned count --- src/stores/WidgetStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/WidgetStore.ts b/src/stores/WidgetStore.ts index 377512223a..10327ce4e9 100644 --- a/src/stores/WidgetStore.ts +++ b/src/stores/WidgetStore.ts @@ -167,7 +167,9 @@ export default class WidgetStore extends AsyncStoreWithClient { // the only case it will go to three is if you have two and then a Jitsi gets added const roomId = this.getRoomId(widgetId); const roomInfo = this.getRoom(roomId); - return roomInfo && Object.keys(roomInfo.pinned).length < 2; + return roomInfo && Object.keys(roomInfo.pinned).filter(k => { + return roomInfo.widgets.some(app => app.id === k); + }).length < 2; } public pinWidget(widgetId: string) { From e6e77633ad41ad2297fd85cf19c5cb8b534c4ed1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 14 Sep 2020 15:20:06 +0100 Subject: [PATCH 2/4] Fix crashes with cannot read isResizing of undefined --- src/components/structures/ScrollPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index b4f5195803..99a3da2565 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -198,7 +198,8 @@ export default class ScrollPanel extends React.Component { } onScroll = ev => { - if (this.props.resizeNotifier.isResizing) return; // skip scroll events caused by resizing + // skip scroll events caused by resizing + if (this.props.resizeNotifier && this.props.resizeNotifier.isResizing) return; debuglog("onScroll", this._getScrollNode().scrollTop); this._scrollTimeout.restart(); this._saveScrollState(); From a5d42d1e2af0c90801e11a892ff8dc7a03a1a56b Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 14 Sep 2020 15:49:09 +0100 Subject: [PATCH 3/4] Prepare changelog for v3.4.1 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0275d25a1..6fa9cc29f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Changes in [3.4.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.4.1) (2020-09-14) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.0...v3.4.1) + + * Don't count widgets which no longer exist towards pinned count + [\#5202](https://github.com/matrix-org/matrix-react-sdk/pull/5202) + * Fix crashes with cannot read isResizing of undefined + [\#5205](https://github.com/matrix-org/matrix-react-sdk/pull/5205) + Changes in [3.4.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.4.0) (2020-09-14) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.0-rc.1...v3.4.0) From 4f930ac50cb114d6233424fcb502fa273ca9636f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 14 Sep 2020 15:49:09 +0100 Subject: [PATCH 4/4] v3.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99d2e42d8f..2dd3e32077 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.4.0", + "version": "3.4.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {