mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-18 07:12:58 +03:00
Appease the linter
This commit is contained in:
parent
31d7de628e
commit
4d38218e24
4 changed files with 2 additions and 3 deletions
|
@ -31,6 +31,7 @@ export let DOWNLOAD_ICON_URL; // cached copy of the download.svg asset for the s
|
|||
|
||||
async function cacheDownloadIcon() {
|
||||
if (DOWNLOAD_ICON_URL) return; // cached already
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const svg = await fetch(require("../../../../res/img/download.svg")).then(r => r.text());
|
||||
DOWNLOAD_ICON_URL = "data:image/svg+xml;base64," + window.btoa(svg);
|
||||
}
|
||||
|
|
|
@ -242,7 +242,6 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||
}
|
||||
|
||||
private async downloadImage() {
|
||||
const content = this.props.mxEvent.getContent();
|
||||
if (this.props.mediaEventHelper.media.isEncrypted && this.state.decryptedUrl === null) {
|
||||
try {
|
||||
const thumbnailUrl = await this.props.mediaEventHelper.thumbnailUrl.value;
|
||||
|
|
|
@ -24,9 +24,7 @@ import MFileBody from "./MFileBody";
|
|||
|
||||
@replaceableComponent("views.messages.MVoiceMessageBody")
|
||||
export default class MVoiceMessageBody extends MAudioBody {
|
||||
|
||||
// A voice message is an audio file but rendered in a special way.
|
||||
|
||||
public render() {
|
||||
if (this.state.error) {
|
||||
// TODO: @@TR: Verify error state
|
||||
|
|
|
@ -85,6 +85,7 @@ export default class PinnedEventTile extends React.Component<IProps> {
|
|||
<div className="mx_PinnedEventTile_message">
|
||||
<MessageEvent
|
||||
mxEvent={this.props.event}
|
||||
// @ts-ignore - complaining that className is invalid when it's not
|
||||
className="mx_PinnedEventTile_body"
|
||||
maxImageHeight={150}
|
||||
onHeightChanged={() => {}} // we need to give this, apparently
|
||||
|
|
Loading…
Reference in a new issue