From b3e8a6df800d01dfec2f85d18b864386f6a55477 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 18 Nov 2020 17:41:54 +0000 Subject: [PATCH] Tweak video component code style --- src/components/views/messages/MVideoBody.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/views/messages/MVideoBody.tsx b/src/components/views/messages/MVideoBody.tsx index fb987a4f0d..671633be9e 100644 --- a/src/components/views/messages/MVideoBody.tsx +++ b/src/components/views/messages/MVideoBody.tsx @@ -71,7 +71,7 @@ export default class MVideoBody extends React.PureComponent { } } - _getContentUrl(): string|null { + private getContentUrl(): string|null { const content = this.props.mxEvent.getContent(); if (content.file !== undefined) { return this.state.decryptedUrl; @@ -80,7 +80,7 @@ export default class MVideoBody extends React.PureComponent { } } - _getThumbUrl(): string|null { + private getThumbUrl(): string|null { const content = this.props.mxEvent.getContent(); if (content.file !== undefined) { return this.state.decryptedThumbnailUrl; @@ -142,8 +142,8 @@ export default class MVideoBody extends React.PureComponent { } } - async _videoOnPlay() { - if (this._getContentUrl() || this.state.fetchingData || this.state.error) { + private videoOnPlay = async () => { + if (this.getContentUrl() || this.state.fetchingData || this.state.error) { // We have the file, we are fetching the file, or there is an error. return; } @@ -195,8 +195,8 @@ export default class MVideoBody extends React.PureComponent { ); } - const contentUrl = this._getContentUrl(); - const thumbUrl = this._getThumbUrl(); + const contentUrl = this.getContentUrl(); + const thumbUrl = this.getThumbUrl(); let height = null; let width = null; let poster = null; @@ -217,7 +217,7 @@ export default class MVideoBody extends React.PureComponent {