Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Delabs Show current avatar and name for users in message history #8764

Merged
merged 14 commits into from
Jul 4, 2022
Merged
Next Next commit
Delabs Show current avatar and name for users in message history
Signed-off-by: Šimon Brandner <[email protected]>
SimonBrandner committed Jun 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit de201f54b0b84b661499a9adc1312ad0c393e28a
4 changes: 2 additions & 2 deletions src/components/views/avatars/MemberAvatar.tsx
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion src/components/views/messages/SenderProfile.tsx
Original file line number Diff line number Diff line change
@@ -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());
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
'Pill.shouldShowPillAvatar',
'TextualBody.enableBigEmoji',
'scrollToBottomOnMessageSent',
'useOnlyCurrentProfiles',
];
static GENERAL_SETTINGS = [
'promptBeforeInviteUnknownUsers',
6 changes: 2 additions & 4 deletions src/settings/Settings.tsx
Original file line number Diff line number Diff line change
@@ -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: [SettingLevel.ACCOUNT],
SimonBrandner marked this conversation as resolved.
Show resolved Hide resolved
displayName: _td("Show current avatar and name for users in message history"),
default: false,
},