Delabs Show current avatar and name for users in message history
(#8764)
Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
parent
0bf5d54041
commit
88afd552d8
8 changed files with 299 additions and 8 deletions
|
@ -42,7 +42,7 @@ interface IProps extends Omit<React.ComponentProps<typeof BaseAvatar>, "name" |
|
|||
pushUserOnClick?: boolean;
|
||||
title?: string;
|
||||
style?: any;
|
||||
forceHistorical?: boolean; // true to deny `feature_use_only_current_profiles` usage. Default false.
|
||||
forceHistorical?: boolean; // true to deny `useOnlyCurrentProfiles` usage. Default false.
|
||||
hideTitle?: boolean;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ export default class MemberAvatar extends React.PureComponent<IProps, IState> {
|
|||
|
||||
private static getState(props: IProps): IState {
|
||||
let member = props.member;
|
||||
if (member && !props.forceHistorical && SettingsStore.getValue("feature_use_only_current_profiles")) {
|
||||
if (member && !props.forceHistorical && SettingsStore.getValue("useOnlyCurrentProfiles")) {
|
||||
const room = MatrixClientPeg.get().getRoom(member.roomId);
|
||||
if (room) {
|
||||
member = room.getMember(member.userId);
|
||||
|
|
|
@ -38,7 +38,7 @@ export default class SenderProfile extends React.PureComponent<IProps> {
|
|||
const msgtype = mxEvent.getContent().msgtype;
|
||||
|
||||
let member = mxEvent.sender;
|
||||
if (SettingsStore.getValue("feature_use_only_current_profiles")) {
|
||||
if (SettingsStore.getValue("useOnlyCurrentProfiles")) {
|
||||
const room = MatrixClientPeg.get().getRoom(mxEvent.getRoomId());
|
||||
if (room) {
|
||||
member = room.getMember(mxEvent.getSender());
|
||||
|
|
|
@ -89,6 +89,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
'Pill.shouldShowPillAvatar',
|
||||
'TextualBody.enableBigEmoji',
|
||||
'scrollToBottomOnMessageSent',
|
||||
'useOnlyCurrentProfiles',
|
||||
];
|
||||
static GENERAL_SETTINGS = [
|
||||
'promptBeforeInviteUnknownUsers',
|
||||
|
|
|
@ -347,10 +347,8 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
|||
displayName: _td("Show extensible event representation of events"),
|
||||
default: false,
|
||||
},
|
||||
"feature_use_only_current_profiles": {
|
||||
isFeature: true,
|
||||
labsGroup: LabGroup.Rooms,
|
||||
supportedLevels: LEVELS_FEATURE,
|
||||
"useOnlyCurrentProfiles": {
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
displayName: _td("Show current avatar and name for users in message history"),
|
||||
default: false,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue