mirror of https://github.com/vector-im/riot-web
parent
83a4558d49
commit
c7870090f8
|
@ -29,7 +29,6 @@ import SettingsStore from '../../settings/SettingsStore';
|
|||
import {_t} from "../../languageHandler";
|
||||
import {haveTileForEvent} from "../views/rooms/EventTile";
|
||||
import {textForEvent} from "../../TextForEvent";
|
||||
import RedactionEventListSummary from "../views/elements/RedactionEventListSummary";
|
||||
|
||||
const CONTINUATION_MAX_INTERVAL = 5 * 60 * 1000; // 5 minutes
|
||||
const continuedTypes = ['m.sticker', 'm.room.message'];
|
||||
|
|
|
@ -22,8 +22,7 @@ import {MatrixEvent, RoomMember} from "matrix-js-sdk";
|
|||
import {useStateToggle} from "../../../hooks/useStateToggle";
|
||||
import AccessibleButton from "./AccessibleButton";
|
||||
|
||||
const EventListSummary = (props) => {
|
||||
const {events, children, threshold=3, onToggle, startExpanded, summaryMembers=[], summaryText, summary} = props;
|
||||
const EventListSummary = ({events, children, threshold=3, onToggle, startExpanded, summaryMembers=[], summaryText}) => {
|
||||
const [expanded, toggleExpanded] = useStateToggle(startExpanded);
|
||||
|
||||
// Whenever expanded changes call onToggle
|
||||
|
@ -50,8 +49,6 @@ const EventListSummary = (props) => {
|
|||
<div className="mx_EventListSummary_line"> </div>
|
||||
{ children }
|
||||
</React.Fragment>;
|
||||
} else if (summary) {
|
||||
body = summary;
|
||||
} else {
|
||||
const avatars = summaryMembers.map((m) => <MemberAvatar key={m.userId} member={m} width={14} height={14} />);
|
||||
body = (
|
||||
|
@ -90,9 +87,6 @@ EventListSummary.propTypes = {
|
|||
// Whether or not to begin with state.expanded=true
|
||||
startExpanded: PropTypes.bool,
|
||||
|
||||
// The node to render as a summary when the summary is not collapsed,
|
||||
// alternately summaryMembers and summaryText can be provided.
|
||||
summary: PropTypes.node,
|
||||
// The list of room members for which to show avatars next to the summary, ignored if summary is provided
|
||||
summaryMembers: PropTypes.arrayOf(PropTypes.instanceOf(RoomMember)),
|
||||
// The text to show as the summary of this event list, ignored if summary is provided
|
||||
|
|
|
@ -1488,8 +1488,6 @@
|
|||
"%(oneUser)smade no changes %(count)s times|one": "%(oneUser)smade no changes",
|
||||
"Power level": "Power level",
|
||||
"Custom level": "Custom level",
|
||||
"%(count)s messages deleted|other": "%(count)s messages deleted",
|
||||
"%(count)s messages deleted by %(name)s|other": "%(count)s messages deleted by %(name)s",
|
||||
"Unable to load event that was replied to, it either does not exist or you do not have permission to view it.": "Unable to load event that was replied to, it either does not exist or you do not have permission to view it.",
|
||||
"<a>In reply to</a> <pill>": "<a>In reply to</a> <pill>",
|
||||
"Room alias": "Room alias",
|
||||
|
|
Loading…
Reference in New Issue