Run all selected prototype community logic through one store
This commit is contained in:
parent
93d67a6689
commit
724e3f6905
8 changed files with 31 additions and 30 deletions
|
@ -27,7 +27,6 @@ import rate_limited_func from "../../../ratelimitedfunc";
|
|||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||
import * as sdk from "../../../index";
|
||||
import CallHandler from "../../../CallHandler";
|
||||
import TagOrderStore from "../../../stores/TagOrderStore";
|
||||
import {CommunityPrototypeStore} from "../../../stores/CommunityPrototypeStore";
|
||||
|
||||
const INITIAL_LOAD_NUM_MEMBERS = 30;
|
||||
|
@ -467,12 +466,9 @@ export default createReactClass({
|
|||
}
|
||||
|
||||
let inviteButtonText = _t("Invite to this room");
|
||||
const communityId = TagOrderStore.getSelectedPrototypeTag();
|
||||
if (communityId) {
|
||||
const chat = CommunityPrototypeStore.instance.getGeneralChat(communityId);
|
||||
if (chat && chat.roomId === this.props.roomId) {
|
||||
inviteButtonText = _t("Invite to this community");
|
||||
}
|
||||
const chat = CommunityPrototypeStore.instance.getSelectedCommunityGeneralChat();
|
||||
if (chat && chat.roomId === this.props.roomId) {
|
||||
inviteButtonText = _t("Invite to this community");
|
||||
}
|
||||
|
||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue