Skip to content

Commit

Permalink
Fix DecoratedRoomAvatar display bug #890
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Feb 8, 2024
1 parent ad8dce3 commit bcea8b7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
21 changes: 20 additions & 1 deletion patches/show-icon-on-public-room/matrix-react-sdk+3.88.0.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/avatars/DecoratedRoomAvatar.tsx b/node_modules/matrix-react-sdk/src/components/views/avatars/DecoratedRoomAvatar.tsx
index 39997e1..5b88a91 100644
index 39997e1..844d59d 100644
--- a/node_modules/matrix-react-sdk/src/components/views/avatars/DecoratedRoomAvatar.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/avatars/DecoratedRoomAvatar.tsx
@@ -30,6 +30,9 @@ import TextWithTooltip from "../elements/TextWithTooltip";
Expand Down Expand Up @@ -64,6 +64,25 @@ index 39997e1..5b88a91 100644
if (!this.isWatchingTimeline) {
this.props.room.on(RoomEvent.Timeline, this.onRoomTimeline);
this.isWatchingTimeline = true;
@@ -205,6 +237,10 @@ export default class DecoratedRoomAvatar extends React.PureComponent<IProps, ISt

return (
<div className={classes}>
+ { /*:TCHAP: extra div to fix positioning.
+ https://github.com/tchapgouv/tchap-web-v4/issues/890
+ Issue should be opened in element-web. */ }
+ <div className="mx_DecoratedRoomAvatar_positionedParent">
<RoomAvatar
room={this.props.room}
size={this.props.size}
@@ -213,6 +249,7 @@ export default class DecoratedRoomAvatar extends React.PureComponent<IProps, ISt
/>
{icon}
{badge}
+ </div> { /*:TCHAP: close div */ }
</div>
);
}
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 d6dd212..67a3727 100644
--- a/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomSummaryCard.tsx
Expand Down
5 changes: 5 additions & 0 deletions res/css/views/avatars/_TchapDecoratedRoomAvatar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Copyright 2022 DINUM
*/

.mx_DecoratedRoomAvatar .mx_DecoratedRoomAvatar_positionedParent {
position: relative;
display: inline-block;
}

.mx_DecoratedRoomAvatar .mx_DecoratedRoomAvatar_icon.mx_DecoratedRoomAvatar_icon_forum::before,
.mx_ExtraTile .mx_DecoratedRoomAvatar_icon_forum::before {
mask-position: center;
Expand Down

0 comments on commit bcea8b7

Please sign in to comment.