Virtualize Messages List - only render what's visible
This commit is contained in:
parent
a976cfe6b6
commit
5ebd8bc690
73 changed files with 4717 additions and 2745 deletions
|
@ -7,7 +7,6 @@ interface Props {
|
|||
*/
|
||||
ios: boolean;
|
||||
theme: 'light-theme' | 'dark-theme';
|
||||
type: 'private' | 'group';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,16 +15,17 @@ interface Props {
|
|||
*/
|
||||
export class ConversationContext extends React.Component<Props> {
|
||||
public render() {
|
||||
const { ios, theme, type } = this.props;
|
||||
const { ios, theme } = this.props;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(theme || 'light-theme', ios ? 'ios-theme' : null)}
|
||||
style={{
|
||||
backgroundColor: theme === 'dark-theme' ? 'black' : undefined,
|
||||
}}
|
||||
>
|
||||
<div className={classNames('conversation', type || 'private')}>
|
||||
<div className="discussion-container" style={{ padding: '0.5em' }}>
|
||||
<ul className="message-list">{this.props.children}</ul>
|
||||
</div>
|
||||
<div className="timeline-placeholder">
|
||||
<div className="timeline-wrapper">{this.props.children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue