Appease the linter

This commit is contained in:
Travis Ralston 2021-07-16 16:11:27 -06:00
parent 31d7de628e
commit 4d38218e24
4 changed files with 2 additions and 3 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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

View file

@ -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