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

Commit 5a75539

Browse files
committed
Introduce a "pinned" tile shape
All components which don't understand this shape will fall through to their normal states, as they would for no explicit tile shape.
1 parent 49c9492 commit 5a75539

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/components/views/audio_messages/RecordingPlayback.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ export default class RecordingPlayback extends React.PureComponent<IProps, IStat
5454
}
5555

5656
private get isWaveformable(): boolean {
57-
return this.props.tileShape !== TileShape.Notif && this.props.tileShape !== TileShape.FileGrid;
57+
return this.props.tileShape !== TileShape.Notif
58+
&& this.props.tileShape !== TileShape.FileGrid
59+
&& this.props.tileShape !== TileShape.Pinned;
5860
}
5961

6062
private onPlaybackUpdate = (ev: PlaybackState) => {

src/components/views/rooms/EventTile.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export enum TileShape {
194194
FileGrid = "file_grid",
195195
Reply = "reply",
196196
ReplyPreview = "reply_preview",
197+
Pinned = "pinned",
197198
}
198199

199200
interface IProps {

src/components/views/rooms/PinnedEventTile.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
2929
import MatrixClientContext from "../../../contexts/MatrixClientContext";
3030
import { getUserNameColorClass } from "../../../utils/FormattingUtils";
3131
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
32+
import { TileShape } from "./EventTile";
3233

3334
interface IProps {
3435
room: Room;
@@ -87,6 +88,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
8788
className="mx_PinnedEventTile_body"
8889
maxImageHeight={150}
8990
onHeightChanged={() => {}} // we need to give this, apparently
91+
tileShape={TileShape.Pinned}
9092
/>
9193
</div>
9294

0 commit comments

Comments
 (0)