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.
This commit is contained in:
parent
49c9492484
commit
5a75539b93
3 changed files with 6 additions and 1 deletions
|
@ -54,7 +54,9 @@ export default class RecordingPlayback extends React.PureComponent<IProps, IStat
|
||||||
}
|
}
|
||||||
|
|
||||||
private get isWaveformable(): boolean {
|
private get isWaveformable(): boolean {
|
||||||
return this.props.tileShape !== TileShape.Notif && this.props.tileShape !== TileShape.FileGrid;
|
return this.props.tileShape !== TileShape.Notif
|
||||||
|
&& this.props.tileShape !== TileShape.FileGrid
|
||||||
|
&& this.props.tileShape !== TileShape.Pinned;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onPlaybackUpdate = (ev: PlaybackState) => {
|
private onPlaybackUpdate = (ev: PlaybackState) => {
|
||||||
|
|
|
@ -194,6 +194,7 @@ export enum TileShape {
|
||||||
FileGrid = "file_grid",
|
FileGrid = "file_grid",
|
||||||
Reply = "reply",
|
Reply = "reply",
|
||||||
ReplyPreview = "reply_preview",
|
ReplyPreview = "reply_preview",
|
||||||
|
Pinned = "pinned",
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
import { getUserNameColorClass } from "../../../utils/FormattingUtils";
|
import { getUserNameColorClass } from "../../../utils/FormattingUtils";
|
||||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||||
|
import { TileShape } from "./EventTile";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
room: Room;
|
room: Room;
|
||||||
|
@ -87,6 +88,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
|
||||||
className="mx_PinnedEventTile_body"
|
className="mx_PinnedEventTile_body"
|
||||||
maxImageHeight={150}
|
maxImageHeight={150}
|
||||||
onHeightChanged={() => {}} // we need to give this, apparently
|
onHeightChanged={() => {}} // we need to give this, apparently
|
||||||
|
tileShape={TileShape.Pinned}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue