You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-04 11:51:45 +03:00
Use FlairStore's cache for group naming
Turns out GroupStore doesn't really know much.
This commit is contained in:
@@ -38,7 +38,7 @@ import {Action} from "../../../dispatcher/actions";
|
||||
import {DefaultTagID} from "../../../stores/room-list/models";
|
||||
import RoomListStore from "../../../stores/room-list/RoomListStore";
|
||||
import TagOrderStore from "../../../stores/TagOrderStore";
|
||||
import GroupStore from "../../../stores/GroupStore";
|
||||
import {CommunityPrototypeStore} from "../../../stores/CommunityPrototypeStore";
|
||||
|
||||
// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
|
||||
/* eslint-disable camelcase */
|
||||
@@ -925,8 +925,7 @@ export default class InviteDialog extends React.PureComponent {
|
||||
let sectionSubname = null;
|
||||
|
||||
if (kind === 'suggestions' && TagOrderStore.getSelectedPrototypeTag()) {
|
||||
const summary = GroupStore.getSummary(TagOrderStore.getSelectedPrototypeTag());
|
||||
const communityName = summary?.profile?.name || TagOrderStore.getSelectedPrototypeTag();
|
||||
const communityName = CommunityPrototypeStore.instance.getCommunityName(TagOrderStore.getSelectedPrototypeTag());
|
||||
sectionSubname = _t("May include members not in %(communityName)s", {communityName});
|
||||
}
|
||||
|
||||
@@ -1099,8 +1098,7 @@ export default class InviteDialog extends React.PureComponent {
|
||||
}},
|
||||
);
|
||||
if (TagOrderStore.getSelectedPrototypeTag()) {
|
||||
const communityId = TagOrderStore.getSelectedPrototypeTag();
|
||||
const communityName = GroupStore.getSummary(communityId)?.profile?.name || communityId;
|
||||
const communityName = CommunityPrototypeStore.instance.getSelectedCommunityName();
|
||||
helpText = _t(
|
||||
"Start a conversation with someone using their name, username (like <userId/>) or email address. " +
|
||||
"This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click " +
|
||||
|
||||
Reference in New Issue
Block a user