Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -21,7 +21,7 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
|||
|
||||
import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext";
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks';
|
||||
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
|
||||
import DateSeparator from "../messages/DateSeparator";
|
||||
import EventTile from "./EventTile";
|
||||
import { shouldFormContinuation } from "../../structures/MessagePanel";
|
||||
|
@ -73,7 +73,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
for (let j = 0; j < timeline.length; j++) {
|
||||
const mxEv = timeline[j];
|
||||
let highlights;
|
||||
const contextual = (j != result.context.getOurEventIndex());
|
||||
const contextual = j != result.context.getOurEventIndex();
|
||||
if (!contextual) {
|
||||
highlights = this.props.searchHighlights;
|
||||
}
|
||||
|
@ -82,7 +82,8 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
// do we need a date separator since the last event?
|
||||
const prevEv = timeline[j - 1];
|
||||
// is this a continuation of the previous message?
|
||||
const continuation = prevEv &&
|
||||
const continuation =
|
||||
prevEv &&
|
||||
!wantsDateSeparator(prevEv.getDate(), mxEv.getDate()) &&
|
||||
shouldFormContinuation(
|
||||
prevEv,
|
||||
|
@ -96,7 +97,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
const nextEv = timeline[j + 1];
|
||||
if (nextEv) {
|
||||
const willWantDateSeparator = wantsDateSeparator(mxEv.getDate(), nextEv.getDate());
|
||||
lastInSection = (
|
||||
lastInSection =
|
||||
willWantDateSeparator ||
|
||||
mxEv.getSender() !== nextEv.getSender() ||
|
||||
!shouldFormContinuation(
|
||||
|
@ -105,8 +106,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
this.context?.showHiddenEvents,
|
||||
threadsEnabled,
|
||||
TimelineRenderingType.Search,
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
ret.push(
|
||||
|
@ -129,8 +129,10 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
}
|
||||
}
|
||||
|
||||
return <li data-scroll-tokens={eventId}>
|
||||
<ol>{ ret }</ol>
|
||||
</li>;
|
||||
return (
|
||||
<li data-scroll-tokens={eventId}>
|
||||
<ol>{ret}</ol>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue