Prevent history visible banner from displaying in threads. (#31535)
* fix: Prevent history visible banner from displaying in threads. * tests: Verify banner is not visible in threads.
This commit is contained in:
@@ -11,7 +11,7 @@ import { type Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { HistoryVisibleBannerViewModel } from "../../../viewmodels/composer/HistoryVisibleBannerViewModel";
|
||||
|
||||
export const HistoryVisibleBanner: React.FC<{ room: Room }> = ({ room }) => {
|
||||
const vm = useCreateAutoDisposedViewModel(() => new HistoryVisibleBannerViewModel({ room }));
|
||||
export const HistoryVisibleBanner: React.FC<{ room: Room; threadId?: string | null }> = (props) => {
|
||||
const vm = useCreateAutoDisposedViewModel(() => new HistoryVisibleBannerViewModel(props));
|
||||
return <HistoryVisibleBannerView vm={vm} />;
|
||||
};
|
||||
|
||||
@@ -675,7 +675,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
|
||||
|
||||
return (
|
||||
<div className={classes} ref={this.ref} role="region" aria-label={_t("a11y|message_composer")}>
|
||||
<HistoryVisibleBanner room={this.props.room} />
|
||||
<HistoryVisibleBanner room={this.props.room} threadId={threadId} />
|
||||
<div className="mx_MessageComposer_wrapper">
|
||||
<UserIdentityWarning room={this.props.room} key={this.props.room.roomId} />
|
||||
<ReplyPreview
|
||||
|
||||
Reference in New Issue
Block a user