Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a5468c9

Browse files
committed
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/widgets
� Conflicts: � src/resizer/distributors/collapse.ts � src/resizer/distributors/fixed.ts � src/resizer/index.ts � src/resizer/item.ts � src/resizer/resizer.ts � src/resizer/sizer.ts
2 parents 5a9bac6 + 4222871 commit a5468c9

File tree

17 files changed

+66
-75
lines changed

17 files changed

+66
-75
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Changes in [3.6.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.6.1) (2020-10-20)
2+
===================================================================================================
3+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.6.0...v3.6.1)
4+
5+
* [Release] Adjust for new widget messaging APIs
6+
[\#5342](https://github.com/matrix-org/matrix-react-sdk/pull/5342)
7+
* [Release] Fix Jitsi OpenIDC auth
8+
[\#5335](https://github.com/matrix-org/matrix-react-sdk/pull/5335)
9+
110
Changes in [3.6.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.6.0) (2020-10-12)
211
===================================================================================================
312
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.6.0-rc.1...v3.6.0)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.6.0",
3+
"version": "3.6.1",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {

release.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ do
3232
echo "Upgrading $i to $latestver..."
3333
yarn add -E $i@$latestver
3434
git add -u
35-
# The `-e` flag opens the editor and gives you a chance to check
36-
# the upgrade for correctness.
37-
git commit -m "Upgrade $i to $latestver" -e
35+
git commit -m "Upgrade $i to $latestver"
3836
fi
3937
fi
4038
done

res/css/structures/_UserMenu.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ limitations under the License.
230230
align-items: center;
231231
justify-content: center;
232232
}
233+
234+
&.mx_UserMenu_contextMenu_hostingLink {
235+
padding-top: 0;
236+
}
233237
}
234238

235239
.mx_IconizedContextMenu_icon {

src/Searching.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ function combineEvents(previousSearchResult, localEvents = undefined, serverEven
360360
let oldestEventFrom = previousSearchResult.oldestEventFrom;
361361
response.highlights = previousSearchResult.highlights;
362362

363-
if (localEvents && serverEvents) {
363+
if (localEvents && serverEvents && serverEvents.results) {
364364
// This is a first search call, combine the events from the server and
365365
// the local index. Note where our oldest event came from, we shall
366366
// fetch the next batch of events from the other source.
@@ -379,7 +379,7 @@ function combineEvents(previousSearchResult, localEvents = undefined, serverEven
379379
oldestEventFrom = "local";
380380
}
381381
combineEventSources(previousSearchResult, response, localEvents.results, cachedEvents);
382-
} else if (serverEvents) {
382+
} else if (serverEvents && serverEvents.results) {
383383
// This is a pagination call fetching more events from the server,
384384
// meaning that our oldest event was in the local index.
385385
// Change the source of the oldest event if our server event is older
@@ -454,7 +454,7 @@ function combineResponses(previousSearchResult, localEvents = undefined, serverE
454454
return response;
455455
}
456456

457-
function restoreEncryptionInfo(searchResultSlice) {
457+
function restoreEncryptionInfo(searchResultSlice = []) {
458458
for (let i = 0; i < searchResultSlice.length; i++) {
459459
const timeline = searchResultSlice[i].context.getTimeline();
460460

@@ -517,7 +517,7 @@ async function combinedPagination(searchResult) {
517517
},
518518
};
519519

520-
const oldResultCount = searchResult.results.length;
520+
const oldResultCount = searchResult.results ? searchResult.results.length : 0;
521521

522522
// Let the client process the combined result.
523523
const result = client._processRoomEventsSearch(searchResult, response);

src/components/structures/LeftPanel.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
388388
const roomList = <RoomList
389389
onKeyDown={this.onKeyDown}
390390
resizeNotifier={null}
391-
collapsed={false}
392391
onFocus={this.onFocus}
393392
onBlur={this.onBlur}
394393
isMinimized={this.props.isMinimized}

src/components/structures/LoggedInView.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import RoomListStore from "../../stores/room-list/RoomListStore";
5252
import NonUrgentToastContainer from "./NonUrgentToastContainer";
5353
import { ToggleRightPanelPayload } from "../../dispatcher/payloads/ToggleRightPanelPayload";
5454
import { IThreepidInvite } from "../../stores/ThreepidInviteStore";
55+
import { ICollapseConfig } from "../../resizer/distributors/collapse";
5556

5657
// We need to fetch each pinned message individually (if we don't already have it)
5758
// so each pinned message may trigger a request. Limit the number per room for sanity.
@@ -205,13 +206,8 @@ class LoggedInView extends React.Component<IProps, IState> {
205206
};
206207

207208
_createResizer() {
208-
const classNames = {
209-
handle: "mx_ResizeHandle",
210-
vertical: "mx_ResizeHandle_vertical",
211-
reverse: "mx_ResizeHandle_reverse",
212-
};
213209
let size;
214-
const collapseConfig = {
210+
const collapseConfig: ICollapseConfig = {
215211
toggleSize: 260 - 50,
216212
onCollapsed: (collapsed) => {
217213
if (collapsed) {
@@ -234,7 +230,11 @@ class LoggedInView extends React.Component<IProps, IState> {
234230
},
235231
};
236232
const resizer = new Resizer(this._resizeContainer.current, CollapseDistributor, collapseConfig);
237-
resizer.setClassNames(classNames);
233+
resizer.setClassNames({
234+
handle: "mx_ResizeHandle",
235+
vertical: "mx_ResizeHandle_vertical",
236+
reverse: "mx_ResizeHandle_reverse",
237+
});
238238
return resizer;
239239
}
240240

src/components/structures/RoomView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ export default class RoomView extends React.Component<IProps, IState> {
12771277
}
12781278

12791279
if (!this.state.searchResults.next_batch) {
1280-
if (this.state.searchResults.results.length == 0) {
1280+
if (!this.state.searchResults?.results?.length) {
12811281
ret.push(<li key="search-top-marker">
12821282
<h2 className="mx_RoomView_topMarker">{ _t("No results") }</h2>
12831283
</li>,
@@ -1301,7 +1301,7 @@ export default class RoomView extends React.Component<IProps, IState> {
13011301

13021302
let lastRoomId;
13031303

1304-
for (let i = this.state.searchResults.results.length - 1; i >= 0; i--) {
1304+
for (let i = (this.state.searchResults?.results?.length || 0) - 1; i >= 0; i--) {
13051305
const result = this.state.searchResults.results[i];
13061306

13071307
const mxEv = result.context.getEvent();
@@ -1970,7 +1970,7 @@ export default class RoomView extends React.Component<IProps, IState> {
19701970

19711971
if (this.state.searchResults) {
19721972
// show searching spinner
1973-
if (this.state.searchResults.results === undefined) {
1973+
if (this.state.searchResults.count === undefined) {
19741974
searchResultsPanel = (
19751975
<div className="mx_RoomView_messagePanel mx_RoomView_messagePanelSearchSpinner" />
19761976
);

src/components/structures/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
257257
const signupLink = getHostingLink("user-context-menu");
258258
if (signupLink) {
259259
hostingLink = (
260-
<div className="mx_UserMenu_contextMenu_header">
260+
<div className="mx_UserMenu_contextMenu_header mx_UserMenu_contextMenu_hostingLink">
261261
{_t(
262262
"<a>Upgrade</a> to your own domain", {},
263263
{

src/components/views/rooms/RoomList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ interface IProps {
5353
onBlur: (ev: React.FocusEvent) => void;
5454
onResize: () => void;
5555
resizeNotifier: ResizeNotifier;
56-
collapsed: boolean;
5756
isMinimized: boolean;
5857
}
5958

@@ -366,7 +365,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
366365

367366
public render() {
368367
let explorePrompt: JSX.Element;
369-
if (RoomListStore.instance.getFirstNameFilterCondition()) {
368+
if (!this.props.isMinimized && RoomListStore.instance.getFirstNameFilterCondition()) {
370369
explorePrompt = <div className="mx_RoomList_explorePrompt">
371370
<div>{_t("Can't see what you’re looking for?")}</div>
372371
<AccessibleButton kind="link" onClick={this.onExplore}>

0 commit comments

Comments
 (0)