mirror of https://github.com/vector-im/riot-web
Merge pull request #6244 from matrix-org/t3chguy/fix/17368
Hide communities invites and the community autocompleter when Spaces onpull/21833/head
commit
2a3b92f7d7
|
@ -55,13 +55,14 @@ const PROVIDERS = [
|
||||||
EmojiProvider,
|
EmojiProvider,
|
||||||
NotifProvider,
|
NotifProvider,
|
||||||
CommandProvider,
|
CommandProvider,
|
||||||
CommunityProvider,
|
|
||||||
DuckDuckGoProvider,
|
DuckDuckGoProvider,
|
||||||
];
|
];
|
||||||
|
|
||||||
// as the spaces feature is device configurable only, and toggling it refreshes the page, we can do this here
|
// as the spaces feature is device configurable only, and toggling it refreshes the page, we can do this here
|
||||||
if (SettingsStore.getValue("feature_spaces")) {
|
if (SettingsStore.getValue("feature_spaces")) {
|
||||||
PROVIDERS.push(SpaceProvider);
|
PROVIDERS.push(SpaceProvider);
|
||||||
|
} else {
|
||||||
|
PROVIDERS.push(CommunityProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Providers will get rejected if they take longer than this.
|
// Providers will get rejected if they take longer than this.
|
||||||
|
|
|
@ -466,6 +466,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderCommunityInvites(): ReactComponentElement<typeof ExtraTile>[] {
|
private renderCommunityInvites(): ReactComponentElement<typeof ExtraTile>[] {
|
||||||
|
if (SettingsStore.getValue("feature_spaces")) return [];
|
||||||
// TODO: Put community invites in a more sensible place (not in the room list)
|
// TODO: Put community invites in a more sensible place (not in the room list)
|
||||||
// See https://github.com/vector-im/element-web/issues/14456
|
// See https://github.com/vector-im/element-web/issues/14456
|
||||||
return MatrixClientPeg.get().getGroups().filter(g => {
|
return MatrixClientPeg.get().getGroups().filter(g => {
|
||||||
|
|
Loading…
Reference in New Issue