Rename RoomCreate -> RoomPredecessorTile (#10047)
This commit is contained in:
parent
2b66cfc25f
commit
a756b33fe9
4 changed files with 19 additions and 18 deletions
|
@ -40,7 +40,7 @@ interface IProps {
|
|||
* A message tile showing that this room was created as an upgrade of a previous
|
||||
* room.
|
||||
*/
|
||||
export const RoomCreate: React.FC<IProps> = ({ mxEvent, timestamp }) => {
|
||||
export const RoomPredecessorTile: React.FC<IProps> = ({ mxEvent, timestamp }) => {
|
||||
const msc3946ProcessDynamicPredecessor = SettingsStore.getValue("feature_dynamic_room_predecessors");
|
||||
|
||||
// Note: we ask the room for its predecessor here, instead of directly using
|
||||
|
@ -74,13 +74,14 @@ export const RoomCreate: React.FC<IProps> = ({ mxEvent, timestamp }) => {
|
|||
|
||||
if (!roomContext.room || roomContext.room.roomId !== mxEvent.getRoomId()) {
|
||||
logger.warn(
|
||||
"RoomCreate unexpectedly used outside of the context of the room containing this m.room.create event.",
|
||||
"RoomPredecessorTile unexpectedly used outside of the context of the" +
|
||||
"room containing this m.room.create event.",
|
||||
);
|
||||
return <></>;
|
||||
}
|
||||
|
||||
if (!predecessor) {
|
||||
logger.warn("RoomCreate unexpectedly used in a room with no predecessor.");
|
||||
logger.warn("RoomPredecessorTile unexpectedly used in a room with no predecessor.");
|
||||
return <div />;
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ import LegacyCallEvent from "../components/views/messages/LegacyCallEvent";
|
|||
import { CallEvent } from "../components/views/messages/CallEvent";
|
||||
import TextualEvent from "../components/views/messages/TextualEvent";
|
||||
import EncryptionEvent from "../components/views/messages/EncryptionEvent";
|
||||
import { RoomCreate } from "../components/views/messages/RoomCreate";
|
||||
import { RoomPredecessorTile } from "../components/views/messages/RoomPredecessorTile";
|
||||
import RoomAvatarEvent from "../components/views/messages/RoomAvatarEvent";
|
||||
import { WIDGET_LAYOUT_EVENT_TYPE } from "../stores/widgets/WidgetLayoutStore";
|
||||
import { ALL_RULE_TYPES } from "../mjolnir/BanList";
|
||||
|
@ -92,7 +92,7 @@ const HiddenEventFactory: Factory = (ref, props) => <HiddenBody ref={ref} {...pr
|
|||
// These factories are exported for reference comparison against pickFactory()
|
||||
export const JitsiEventFactory: Factory = (ref, props) => <MJitsiWidgetEvent ref={ref} {...props} />;
|
||||
export const JSONEventFactory: Factory = (ref, props) => <ViewSourceEvent ref={ref} {...props} />;
|
||||
export const RoomCreateEventFactory: Factory = (ref, props) => <RoomCreate {...props} />;
|
||||
export const RoomCreateEventFactory: Factory = (_ref, props) => <RoomPredecessorTile {...props} />;
|
||||
|
||||
const EVENT_TILE_TYPES = new Map<string, Factory>([
|
||||
[EventType.RoomMessage, MessageEventFactory], // note that verification requests are handled in pickFactory()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue