Fix room directory ts migration

pull/21833/head
Michael Telatynski 2021-05-19 19:30:56 +01:00
parent 8b67cdb80b
commit a61e977b5f
1 changed files with 9 additions and 9 deletions

View File

@ -106,13 +106,15 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
CountlyAnalytics.instance.trackRoomDirectoryBegin();
this.startTime = CountlyAnalytics.getTimestamp();
const selectedCommunityId = GroupFilterOrderStore.getSelectedTags()[0];
const selectedCommunityId = SettingsStore.getValue("feature_communities_v2_prototypes")
? GroupFilterOrderStore.getSelectedTags()[0]
: null;
let protocolsLoading = true;
if (!MatrixClientPeg.get()) {
// We may not have a client yet when invoked from welcome page
protocolsLoading = false;
} else if (!this.state.selectedCommunityId) {
} else if (!selectedCommunityId) {
MatrixClientPeg.get().getThirdpartyProtocols().then((response) => {
this.protocols = response;
this.setState({ protocolsLoading: false });
@ -152,9 +154,7 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
instanceId: undefined,
roomServer: MatrixClientPeg.getHomeserverName(),
filterString: this.props.initialText || "",
selectedCommunityId: SettingsStore.getValue("feature_communities_v2_prototypes")
? selectedCommunityId
: null,
selectedCommunityId,
communityName: null,
protocolsLoading,
};