Tidy Quote class, removing comments etc

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-12-10 12:54:19 +00:00
parent 0f85391587
commit b6182f7e6c
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E

View File

@ -15,14 +15,8 @@ limitations under the License.
*/
import React from 'react';
import sdk from '../../../index';
import dis from '../../../dispatcher';
import classNames from 'classnames';
import { Room, RoomMember } from 'matrix-js-sdk';
import PropTypes from 'prop-types';
import MatrixClientPeg from '../../../MatrixClientPeg';
import { getDisplayAliasForRoom } from '../../../Rooms';
import {makeUserPermalink} from "../../../matrix-to";
import DateUtils from "../../../DateUtils";
// For URLs of matrix.to links in the timeline which have been reformatted by
// HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`)
@ -87,14 +81,9 @@ const Quote = React.createClass({
},
componentWillMount() {
this._unmounted = false;
this.componentWillReceiveProps(this.props);
},
componentWillUnmount() {
this._unmounted = true;
},
async getEvent(room, eventId) {
let event = room.findEventById(eventId);
if (event) {
@ -111,27 +100,16 @@ const Quote = React.createClass({
const ev = this.state.event;
if (ev) {
const EventTile = sdk.getComponent('views.rooms.EventTile');
// const EmojiText = sdk.getComponent('views.elements.EmojiText');
// const Pill = sdk.getComponent('views.elements.Pill');
// const senderUrl = makeUserPermalink(ev.getSender());
// const EventTileType = sdk.getComponent(EventTile.getHandlerTile(ev));
/*return <a href={this.props.url} >*/
return <blockquote>
{/*<span style={{borderBottom: '2px red'}}>*/}
{/*<Pill room={this.state.room} url={senderUrl} shouldShowPillAvatar={this.props.shouldShowPillAvatar} />*/}
{/*&nbsp;<a href={this.props.url}><EmojiText>🔗</EmojiText> { DateUtils.formatTime(new Date(ev.getTs())) }</a>*/}
{/*</span>*/}
<EventTile mxEvent={ev} tileShape="quote" />
{/*<EventTileType mxEvent={ev} />*/}
</blockquote>;
/*</a>;*/
} else {
// Deliberately render nothing if the URL isn't recognised
return <div>
<a href={this.props.url}>Quote</a>
<br />
</div>;
}
// Deliberately render nothing if the URL isn't recognised
return <div>
<a href={this.props.url}>Quote</a>
<br />
</div>;
},
});