Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorate room avatar in room settings #759

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
},
"show-icon-on-public-room": {
"package": "matrix-react-sdk",
"files": ["src/components/views/avatars/DecoratedRoomAvatar.tsx"]
"files": [
"src/components/views/avatars/DecoratedRoomAvatar.tsx",
"src/components/views/right_panel/RoomSummaryCard.tsx"
]
},
"simplify-exchange-key-message": {
"package": "matrix-react-sdk",
Expand Down
33 changes: 33 additions & 0 deletions patches/show-icon-on-public-room/matrix-react-sdk+3.78.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,36 @@ index fffb643..1034d9c 100644
if (!this.isWatchingTimeline) {
this.props.room.on(RoomEvent.Timeline, this.onRoomTimeline);
this.isWatchingTimeline = true;
diff --git a/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomSummaryCard.tsx b/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomSummaryCard.tsx
index d87c556..0c423b4 100644
--- a/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomSummaryCard.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomSummaryCard.tsx
@@ -22,7 +22,7 @@ import MatrixClientContext from "../../../contexts/MatrixClientContext";
import { useIsEncrypted } from "../../../hooks/useIsEncrypted";
import BaseCard, { Group } from "./BaseCard";
import { _t } from "../../../languageHandler";
-import RoomAvatar from "../avatars/RoomAvatar";
+import DecoratedRoomAvatar from "../avatars/DecoratedRoomAvatar";
import AccessibleButton, { ButtonEvent, IAccessibleButtonProps } from "../elements/AccessibleButton";
import defaultDispatcher from "../../../dispatcher/dispatcher";
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases";
@@ -307,7 +307,11 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose })
const header = (
<React.Fragment>
<div className="mx_RoomSummaryCard_avatar" role="presentation">
+ {/** :TCHAP: decorate the avatar with the tchap lock icons
<RoomAvatar room={room} height={54} width={54} viewAvatarOnClick />
+ */}
+ <DecoratedRoomAvatar room={room} avatarSize={54} viewAvatarOnClick />
+ {/** remove the extra badge
<TextWithTooltip
tooltip={isRoomEncrypted ? _t("Encrypted") : _t("Not encrypted")}
class={classNames("mx_RoomSummaryCard_e2ee", {
@@ -316,6 +320,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose })
mx_RoomSummaryCard_e2ee_verified: isRoomEncrypted && e2eStatus === E2EStatus.Verified,
})}
/>
+ end :TCHAP: */}
</div>

<RoomName room={room}>
Loading