mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Remove ability to remove avatars
This commit is contained in:
parent
5380e76b7b
commit
4deeef5fca
@ -174,11 +174,6 @@ export default class MessagePanel extends React.Component {
|
|||||||
SettingsStore.watchSetting("showTypingNotifications", null, this.onShowTypingNotificationsChange);
|
SettingsStore.watchSetting("showTypingNotifications", null, this.onShowTypingNotificationsChange);
|
||||||
|
|
||||||
this._layoutWatcherRef = SettingsStore.watchSetting("feature_irc_ui", null, this.onLayoutChange);
|
this._layoutWatcherRef = SettingsStore.watchSetting("feature_irc_ui", null, this.onLayoutChange);
|
||||||
this._displayAvatarsWatcherRef = SettingsStore.watchSetting(
|
|
||||||
"feature_no_timeline_avatars",
|
|
||||||
null,
|
|
||||||
this.onDisplayAvatarsChange,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -189,7 +184,6 @@ export default class MessagePanel extends React.Component {
|
|||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
SettingsStore.unwatchSetting(this._showTypingNotificationsWatcherRef);
|
SettingsStore.unwatchSetting(this._showTypingNotificationsWatcherRef);
|
||||||
SettingsStore.unwatchSetting(this._layoutWatcherRef);
|
SettingsStore.unwatchSetting(this._layoutWatcherRef);
|
||||||
SettingsStore.unwatchSetting(this._displayAvatarsWatcherRef);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
@ -214,12 +208,6 @@ export default class MessagePanel extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDisplayAvatarsChange = () => {
|
|
||||||
this.setState({
|
|
||||||
displayAvatars: SettingsStore.getValue("feature_no_timeline_avatars"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get the DOM node representing the given event */
|
/* get the DOM node representing the given event */
|
||||||
getNodeForEventId(eventId) {
|
getNodeForEventId(eventId) {
|
||||||
if (!this.eventNodes) {
|
if (!this.eventNodes) {
|
||||||
@ -622,7 +610,6 @@ export default class MessagePanel extends React.Component {
|
|||||||
getRelationsForEvent={this.props.getRelationsForEvent}
|
getRelationsForEvent={this.props.getRelationsForEvent}
|
||||||
showReactions={this.props.showReactions}
|
showReactions={this.props.showReactions}
|
||||||
useIRCLayout={this.state.useIRCLayout}
|
useIRCLayout={this.state.useIRCLayout}
|
||||||
displayAvatars={this.state.displayAvatars}
|
|
||||||
/>
|
/>
|
||||||
</TileErrorBoundary>
|
</TileErrorBoundary>
|
||||||
</li>,
|
</li>,
|
||||||
|
@ -39,8 +39,6 @@ export default class ReplyThread extends React.Component {
|
|||||||
permalinkCreator: PropTypes.instanceOf(RoomPermalinkCreator).isRequired,
|
permalinkCreator: PropTypes.instanceOf(RoomPermalinkCreator).isRequired,
|
||||||
// Specifies which layout to use.
|
// Specifies which layout to use.
|
||||||
useIRCLayout: PropTypes.bool,
|
useIRCLayout: PropTypes.bool,
|
||||||
// Specifies whether to display avatars.
|
|
||||||
displayAvatars: PropTypes.bool,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static contextType = MatrixClientContext;
|
static contextType = MatrixClientContext;
|
||||||
@ -180,7 +178,7 @@ export default class ReplyThread extends React.Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static makeThread(parentEv, onHeightChanged, permalinkCreator, ref, useIRCLayout, displayAvatars) {
|
static makeThread(parentEv, onHeightChanged, permalinkCreator, ref, useIRCLayout) {
|
||||||
if (!ReplyThread.getParentEventId(parentEv)) {
|
if (!ReplyThread.getParentEventId(parentEv)) {
|
||||||
return <div className="mx_ReplyThread_wrapper_empty" />;
|
return <div className="mx_ReplyThread_wrapper_empty" />;
|
||||||
}
|
}
|
||||||
@ -190,7 +188,7 @@ export default class ReplyThread extends React.Component {
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
permalinkCreator={permalinkCreator}
|
permalinkCreator={permalinkCreator}
|
||||||
useIRCLayout={useIRCLayout}
|
useIRCLayout={useIRCLayout}
|
||||||
displayAvatars={displayAvatars} />;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -342,7 +340,6 @@ export default class ReplyThread extends React.Component {
|
|||||||
isRedacted={ev.isRedacted()}
|
isRedacted={ev.isRedacted()}
|
||||||
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")}
|
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")}
|
||||||
useIRCLayout={this.props.useIRCLayout}
|
useIRCLayout={this.props.useIRCLayout}
|
||||||
displayAvatars={this.props.displayAvatars}
|
|
||||||
/>
|
/>
|
||||||
</blockquote>;
|
</blockquote>;
|
||||||
});
|
});
|
||||||
|
@ -209,9 +209,6 @@ export default createReactClass({
|
|||||||
|
|
||||||
// whether to use the irc layout
|
// whether to use the irc layout
|
||||||
useIRCLayout: PropTypes.bool,
|
useIRCLayout: PropTypes.bool,
|
||||||
|
|
||||||
// whether to display avatars
|
|
||||||
displayAvatars: PropTypes.bool,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps: function() {
|
getDefaultProps: function() {
|
||||||
@ -714,7 +711,7 @@ export default createReactClass({
|
|||||||
needsSenderProfile = true;
|
needsSenderProfile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.mxEvent.sender && avatarSize && this.props.displayAvatars) {
|
if (this.props.mxEvent.sender && avatarSize) {
|
||||||
avatar = (
|
avatar = (
|
||||||
<div className="mx_EventTile_avatar">
|
<div className="mx_EventTile_avatar">
|
||||||
<MemberAvatar member={this.props.mxEvent.sender}
|
<MemberAvatar member={this.props.mxEvent.sender}
|
||||||
@ -898,7 +895,6 @@ export default createReactClass({
|
|||||||
this.props.permalinkCreator,
|
this.props.permalinkCreator,
|
||||||
this._replyThread,
|
this._replyThread,
|
||||||
this.props.useIRCLayout,
|
this.props.useIRCLayout,
|
||||||
this.props.displayAvatars,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers
|
// tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers
|
||||||
|
@ -143,12 +143,6 @@ export const SETTINGS = {
|
|||||||
default: false,
|
default: false,
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
},
|
},
|
||||||
"feature_no_timeline_avatars": {
|
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
||||||
displayName: _td('Display user avatars on messages'),
|
|
||||||
default: true,
|
|
||||||
isFeature: true,
|
|
||||||
},
|
|
||||||
"mjolnirRooms": {
|
"mjolnirRooms": {
|
||||||
supportedLevels: ['account'],
|
supportedLevels: ['account'],
|
||||||
default: [],
|
default: [],
|
||||||
|
Loading…
Reference in New Issue
Block a user