mirror of https://github.com/vector-im/riot-web
Override audio and video body with file body
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
04db6beb10
commit
782563af53
|
@ -21,8 +21,14 @@ limitations under the License.
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: $font-16px;
|
line-height: $font-16px;
|
||||||
|
|
||||||
.mx_MFileBody_info {
|
.mx_MFileBody {
|
||||||
margin: 5px 0;
|
.mx_MFileBody_info {
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_MFileBody_download {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import * as sdk from '../../../index';
|
||||||
import { EventType, MsgType } from 'matrix-js-sdk/src/@types/event';
|
import { EventType, MsgType } from 'matrix-js-sdk/src/@types/event';
|
||||||
import { replaceableComponent } from '../../../utils/replaceableComponent';
|
import { replaceableComponent } from '../../../utils/replaceableComponent';
|
||||||
import { getEventDisplayInfo } from '../../../utils/EventUtils';
|
import { getEventDisplayInfo } from '../../../utils/EventUtils';
|
||||||
|
import MFileBody from "../messages/MFileBody";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
mxEvent: MatrixEvent;
|
mxEvent: MatrixEvent;
|
||||||
|
@ -115,8 +116,9 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
||||||
|
|
||||||
const msgtypeOverrides = {
|
const msgtypeOverrides = {
|
||||||
[MsgType.Image]: MImageReplyBody,
|
[MsgType.Image]: MImageReplyBody,
|
||||||
[MsgType.Audio]: TextualBody,
|
// Override audio and video body with file body. We also hide the download/decrypt button using CSS
|
||||||
[MsgType.Video]: TextualBody,
|
[MsgType.Audio]: MFileBody,
|
||||||
|
[MsgType.Video]: MFileBody,
|
||||||
};
|
};
|
||||||
const evOverrides = {
|
const evOverrides = {
|
||||||
[EventType.Sticker]: TextualBody,
|
[EventType.Sticker]: TextualBody,
|
||||||
|
|
Loading…
Reference in New Issue