message: Fix room directory ts migration
diff: @@ -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,
  };
  