Fix lints
Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
parent
adb5df52a4
commit
c0e10218d9
2 changed files with 4 additions and 4 deletions
|
@ -693,9 +693,9 @@ export function hasText(ev: MatrixEvent, showHiddenEvents?: boolean): boolean {
|
||||||
* @param showHiddenEvents An optional cached setting value for showHiddenEventsInTimeline
|
* @param showHiddenEvents An optional cached setting value for showHiddenEventsInTimeline
|
||||||
* to avoid hitting the settings store
|
* to avoid hitting the settings store
|
||||||
*/
|
*/
|
||||||
export function textForEvent(
|
export function textForEvent(ev: MatrixEvent): string;
|
||||||
ev: MatrixEvent, allowJSX: boolean = false, showHiddenEvents?: boolean
|
export function textForEvent(ev: MatrixEvent, allowJSX: true, showHiddenEvents?: boolean): string | JSX.Element;
|
||||||
): string | JSX.Element {
|
export function textForEvent(ev: MatrixEvent, allowJSX = false, showHiddenEvents?: boolean): string | JSX.Element {
|
||||||
const handler = (ev.isState() ? stateHandlers : handlers)[ev.getType()];
|
const handler = (ev.isState() ? stateHandlers : handlers)[ev.getType()];
|
||||||
return handler?.(ev, allowJSX, showHiddenEvents)?.() ?? '';
|
return handler?.(ev, allowJSX, showHiddenEvents)?.() ?? '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default class TextualEvent extends React.Component<IProps> {
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
const text = TextForEvent.textForEvent(this.props.mxEvent, true, this.context?.showHiddenEventsInTimeline);
|
const text = TextForEvent.textForEvent(this.props.mxEvent, true, this.context?.showHiddenEventsInTimeline);
|
||||||
if (text == null || text.length === 0) return null;
|
if (!text) return null;
|
||||||
return <div className="mx_TextualEvent">{ text }</div>;
|
return <div className="mx_TextualEvent">{ text }</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue