mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 20:26:19 +02:00
WIP -2
This commit is contained in:
parent
28c450d84a
commit
044687a3af
@ -66,7 +66,6 @@ import { CreationGrouper } from "./grouper/CreationGrouper";
|
||||
import { _t } from "../../languageHandler";
|
||||
import { getLateEventInfo } from "./grouper/LateEventGrouper";
|
||||
import { useSettingValue } from "../../hooks/useSettings";
|
||||
import { useRoomState } from "../../hooks/useRoomState";
|
||||
import { useTypedEventEmitter } from "../../hooks/useEventEmitter";
|
||||
|
||||
const CONTINUATION_MAX_INTERVAL = 5 * 60 * 1000; // 5 minutes
|
||||
@ -186,7 +185,7 @@ export interface MessagePanelMethods {
|
||||
nextEventWithTile?: MatrixEvent | null,
|
||||
) => ReactNode[];
|
||||
layout?: Layout;
|
||||
scrollPanel: RefObject<ScrollPanel>;
|
||||
scrollPanel: RefObject<ScrollPanel | null>;
|
||||
getNodeForEventId: (eventId: string) => HTMLElement | undefined;
|
||||
}
|
||||
|
||||
@ -271,6 +270,7 @@ interface IProps {
|
||||
|
||||
callEventGroupers: Map<string, LegacyCallEventGrouper>;
|
||||
ref: RefObject<MessagePanelMethods | null>;
|
||||
props: IProps;
|
||||
}
|
||||
|
||||
interface IReadReceiptForUser {
|
||||
@ -725,10 +725,12 @@ export const MessagePanelNew: React.FC<IProps> = (props: IProps) => {
|
||||
layout: props.layout,
|
||||
scrollPanel,
|
||||
getNodeForEventId,
|
||||
props,
|
||||
};
|
||||
});
|
||||
|
||||
const getEventTiles = (): ReactNode[] => {
|
||||
if (!props.ref.current) return [];
|
||||
// first figure out which is the last event in the list which we're
|
||||
// actually going to show; this allows us to behave slightly
|
||||
// differently for the last event in the list. (eg show timestamp)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user