Remove unused refs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-12-08 12:12:06 +00:00
parent 142a71cc67
commit 4c55f3c5b5
10 changed files with 40 additions and 39 deletions

View file

@ -1214,25 +1214,25 @@ export default createReactClass({
const EditableText = sdk.getComponent("elements.EditableText"); const EditableText = sdk.getComponent("elements.EditableText");
nameNode = <EditableText ref="nameEditor" nameNode = <EditableText
className="mx_GroupView_editable" className="mx_GroupView_editable"
placeholderClassName="mx_GroupView_placeholder" placeholderClassName="mx_GroupView_placeholder"
placeholder={_t('Community Name')} placeholder={_t('Community Name')}
blurToCancel={false} blurToCancel={false}
initialValue={this.state.profileForm.name} initialValue={this.state.profileForm.name}
onValueChanged={this._onNameChange} onValueChanged={this._onNameChange}
tabIndex="0" tabIndex="0"
dir="auto" />; dir="auto" />;
shortDescNode = <EditableText ref="descriptionEditor" shortDescNode = <EditableText
className="mx_GroupView_editable" className="mx_GroupView_editable"
placeholderClassName="mx_GroupView_placeholder" placeholderClassName="mx_GroupView_placeholder"
placeholder={_t("Description")} placeholder={_t("Description")}
blurToCancel={false} blurToCancel={false}
initialValue={this.state.profileForm.short_description} initialValue={this.state.profileForm.short_description}
onValueChanged={this._onShortDescChange} onValueChanged={this._onShortDescChange}
tabIndex="0" tabIndex="0"
dir="auto" />; dir="auto" />;
} else { } else {
const onGroupHeaderItemClick = this.state.isUserMember ? this._onEditClick : null; const onGroupHeaderItemClick = this.state.isUserMember ? this._onEditClick : null;
const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null;

View file

@ -572,7 +572,7 @@ module.exports = createReactClass({
if (rows.length === 0 && !this.state.loading) { if (rows.length === 0 && !this.state.loading) {
scrollpanel_content = <i>{ _t('No rooms to show') }</i>; scrollpanel_content = <i>{ _t('No rooms to show') }</i>;
} else { } else {
scrollpanel_content = <table ref="directory_table" className="mx_RoomDirectory_table"> scrollpanel_content = <table className="mx_RoomDirectory_table">
<tbody> <tbody>
{ rows } { rows }
</tbody> </tbody>

View file

@ -1719,7 +1719,7 @@ module.exports = createReactClass({
aux = <ForwardMessage onCancelClick={this.onCancelClick} />; aux = <ForwardMessage onCancelClick={this.onCancelClick} />;
} else if (this.state.searching) { } else if (this.state.searching) {
hideCancel = true; // has own cancel hideCancel = true; // has own cancel
aux = <SearchBar ref="search_bar" searchInProgress={this.state.searchInProgress} onCancelClick={this.onCancelSearchClick} onSearch={this.onSearch} />; aux = <SearchBar searchInProgress={this.state.searchInProgress} onCancelClick={this.onCancelSearchClick} onSearch={this.onSearch} />;
} else if (showRoomUpgradeBar) { } else if (showRoomUpgradeBar) {
aux = <RoomUpgradeWarningBar room={this.state.room} recommendation={roomVersionRecommendation} />; aux = <RoomUpgradeWarningBar room={this.state.room} recommendation={roomVersionRecommendation} />;
hideCancel = true; hideCancel = true;
@ -1775,7 +1775,7 @@ module.exports = createReactClass({
} }
const auxPanel = ( const auxPanel = (
<AuxPanel ref="auxPanel" room={this.state.room} <AuxPanel room={this.state.room}
fullHeight={false} fullHeight={false}
userId={MatrixClientPeg.get().credentials.userId} userId={MatrixClientPeg.get().credentials.userId}
conferenceHandler={this.props.ConferenceHandler} conferenceHandler={this.props.ConferenceHandler}

View file

@ -80,7 +80,7 @@ export default class MAudioBody extends React.Component {
if (this.state.error !== null) { if (this.state.error !== null) {
return ( return (
<span className="mx_MAudioBody" ref="body"> <span className="mx_MAudioBody">
<img src={require("../../../../res/img/warning.svg")} width="16" height="16" /> <img src={require("../../../../res/img/warning.svg")} width="16" height="16" />
{ _t("Error decrypting audio") } { _t("Error decrypting audio") }
</span> </span>

View file

@ -325,7 +325,7 @@ module.exports = createReactClass({
}; };
return ( return (
<span className="mx_MFileBody" ref="body"> <span className="mx_MFileBody">
<div className="mx_MFileBody_download"> <div className="mx_MFileBody_download">
<a href="javascript:void(0)" onClick={decrypt}> <a href="javascript:void(0)" onClick={decrypt}>
{ _t("Decrypt %(text)s", { text: text }) } { _t("Decrypt %(text)s", { text: text }) }

View file

@ -459,7 +459,7 @@ export default class MImageBody extends React.Component {
if (this.state.error !== null) { if (this.state.error !== null) {
return ( return (
<span className="mx_MImageBody" ref="body"> <span className="mx_MImageBody">
<img src={require("../../../../res/img/warning.svg")} width="16" height="16" /> <img src={require("../../../../res/img/warning.svg")} width="16" height="16" />
{ _t("Error decrypting image") } { _t("Error decrypting image") }
</span> </span>
@ -477,7 +477,7 @@ export default class MImageBody extends React.Component {
const thumbnail = this._messageContent(contentUrl, thumbUrl, content); const thumbnail = this._messageContent(contentUrl, thumbUrl, content);
const fileBody = this.getFileBody(); const fileBody = this.getFileBody();
return <span className="mx_MImageBody" ref="body"> return <span className="mx_MImageBody">
{ thumbnail } { thumbnail }
{ fileBody } { fileBody }
</span>; </span>;

View file

@ -132,7 +132,7 @@ module.exports = createReactClass({
if (this.state.error !== null) { if (this.state.error !== null) {
return ( return (
<span className="mx_MVideoBody" ref="body"> <span className="mx_MVideoBody">
<img src={require("../../../../res/img/warning.svg")} width="16" height="16" /> <img src={require("../../../../res/img/warning.svg")} width="16" height="16" />
{ _t("Error decrypting video") } { _t("Error decrypting video") }
</span> </span>
@ -144,8 +144,8 @@ module.exports = createReactClass({
// The attachment is decrypted in componentDidMount. // The attachment is decrypted in componentDidMount.
// For now add an img tag with a spinner. // For now add an img tag with a spinner.
return ( return (
<span className="mx_MVideoBody" ref="body"> <span className="mx_MVideoBody">
<div className="mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner" ref="image"> <div className="mx_MImageBody_thumbnail mx_MImageBody_thumbnail_spinner">
<img src={require("../../../../res/img/spinner.gif")} alt={content.body} width="16" height="16" /> <img src={require("../../../../res/img/spinner.gif")} alt={content.body} width="16" height="16" />
</div> </div>
</span> </span>

View file

@ -188,14 +188,15 @@ module.exports = createReactClass({
} }
const callView = ( const callView = (
<CallView ref="callView" room={this.props.room} <CallView
room={this.props.room}
ConferenceHandler={this.props.conferenceHandler} ConferenceHandler={this.props.conferenceHandler}
onResize={this.props.onResize} onResize={this.props.onResize}
maxVideoHeight={this.props.maxHeight} maxVideoHeight={this.props.maxHeight}
/> />
); );
const appsDrawer = <AppsDrawer ref="appsDrawer" const appsDrawer = <AppsDrawer
room={this.props.room} room={this.props.room}
userId={this.props.userId} userId={this.props.userId}
maxHeight={this.props.maxHeight} maxHeight={this.props.maxHeight}

View file

@ -55,7 +55,7 @@ export default createReactClass({
if (rows.length === 0) { if (rows.length === 0) {
rooms = <i>{ _t('No rooms to show') }</i>; rooms = <i>{ _t('No rooms to show') }</i>;
} else { } else {
rooms = <table ref="directory_table" className="mx_RoomDirectory_table"> rooms = <table className="mx_RoomDirectory_table">
<tbody> <tbody>
{ this.getRows() } { this.getRows() }
</tbody> </tbody>

View file

@ -65,14 +65,14 @@ module.exports = createReactClass({
return ( return (
<div className="mx_RoomHeader_name"> <div className="mx_RoomHeader_name">
<EditableText ref="editor" <EditableText
className="mx_RoomHeader_nametext mx_RoomHeader_editable" className="mx_RoomHeader_nametext mx_RoomHeader_editable"
placeholderClassName="mx_RoomHeader_placeholder" placeholderClassName="mx_RoomHeader_placeholder"
placeholder={this._placeholderName} placeholder={this._placeholderName}
blurToCancel={false} blurToCancel={false}
initialValue={this.state.name} initialValue={this.state.name}
onValueChanged={this._onValueChanged} onValueChanged={this._onValueChanged}
dir="auto" /> dir="auto" />
</div> </div>
); );
}, },