mirror of https://github.com/vector-im/riot-web
				
				
				
			
							parent
							
								
									f68036a4fb
								
							
						
					
					
						commit
						f0b7fd58b9
					
				| 
						 | 
					@ -202,17 +202,12 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!this._propsEqual(this.props, nextProps)) {
 | 
					        return !this._propsEqual(this.props, nextProps);
 | 
				
			||||||
            return true;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return false;
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    componentWillUnmount: function() {
 | 
					    componentWillUnmount: function() {
 | 
				
			||||||
        const client = this.props.matrixClient;
 | 
					        const client = this.props.matrixClient;
 | 
				
			||||||
        client.removeListener("deviceVerificationChanged",
 | 
					        client.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged);
 | 
				
			||||||
                              this.onDeviceVerificationChanged);
 | 
					 | 
				
			||||||
        this.props.mxEvent.removeListener("Event.decrypted", this._onDecrypted);
 | 
					        this.props.mxEvent.removeListener("Event.decrypted", this._onDecrypted);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -227,7 +222,7 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    onDeviceVerificationChanged: function(userId, device) {
 | 
					    onDeviceVerificationChanged: function(userId, device) {
 | 
				
			||||||
        if (userId == this.props.mxEvent.getSender()) {
 | 
					        if (userId === this.props.mxEvent.getSender()) {
 | 
				
			||||||
            this._verifyEvent(this.props.mxEvent);
 | 
					            this._verifyEvent(this.props.mxEvent);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
| 
						 | 
					@ -262,7 +257,7 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // need to deep-compare readReceipts
 | 
					            // need to deep-compare readReceipts
 | 
				
			||||||
            if (key == 'readReceipts') {
 | 
					            if (key === 'readReceipts') {
 | 
				
			||||||
                const rA = objA[key];
 | 
					                const rA = objA[key];
 | 
				
			||||||
                const rB = objB[key];
 | 
					                const rB = objB[key];
 | 
				
			||||||
                if (rA === rB) {
 | 
					                if (rA === rB) {
 | 
				
			||||||
| 
						 | 
					@ -336,7 +331,7 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
    getReadAvatars: function() {
 | 
					    getReadAvatars: function() {
 | 
				
			||||||
        // return early if there are no read receipts
 | 
					        // return early if there are no read receipts
 | 
				
			||||||
        if (!this.props.readReceipts || this.props.readReceipts.length === 0) {
 | 
					        if (!this.props.readReceipts || this.props.readReceipts.length === 0) {
 | 
				
			||||||
            return (<span className="mx_EventTile_readAvatars"></span>);
 | 
					            return (<span className="mx_EventTile_readAvatars" />);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
 | 
					        const ReadReceiptMarker = sdk.getComponent('rooms.ReadReceiptMarker');
 | 
				
			||||||
| 
						 | 
					@ -360,7 +355,7 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
            left = (hidden ? MAX_READ_AVATARS - 1 : i) * -receiptOffset;
 | 
					            left = (hidden ? MAX_READ_AVATARS - 1 : i) * -receiptOffset;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const userId = receipt.roomMember.userId;
 | 
					            const userId = receipt.roomMember.userId;
 | 
				
			||||||
            var readReceiptInfo;
 | 
					            let readReceiptInfo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (this.props.readReceiptMap) {
 | 
					            if (this.props.readReceiptMap) {
 | 
				
			||||||
                readReceiptInfo = this.props.readReceiptMap[userId];
 | 
					                readReceiptInfo = this.props.readReceiptMap[userId];
 | 
				
			||||||
| 
						 | 
					@ -502,17 +497,17 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
            mx_EventTile: true,
 | 
					            mx_EventTile: true,
 | 
				
			||||||
            mx_EventTile_info: isInfoMessage,
 | 
					            mx_EventTile_info: isInfoMessage,
 | 
				
			||||||
            mx_EventTile_12hr: this.props.isTwelveHour,
 | 
					            mx_EventTile_12hr: this.props.isTwelveHour,
 | 
				
			||||||
            mx_EventTile_encrypting: this.props.eventSendStatus == 'encrypting',
 | 
					            mx_EventTile_encrypting: this.props.eventSendStatus === 'encrypting',
 | 
				
			||||||
            mx_EventTile_sending: isSending,
 | 
					            mx_EventTile_sending: isSending,
 | 
				
			||||||
            mx_EventTile_notSent: this.props.eventSendStatus == 'not_sent',
 | 
					            mx_EventTile_notSent: this.props.eventSendStatus === 'not_sent',
 | 
				
			||||||
            mx_EventTile_highlight: this.props.tileShape == 'notif' ? false : this.shouldHighlight(),
 | 
					            mx_EventTile_highlight: this.props.tileShape === 'notif' ? false : this.shouldHighlight(),
 | 
				
			||||||
            mx_EventTile_selected: this.props.isSelectedEvent,
 | 
					            mx_EventTile_selected: this.props.isSelectedEvent,
 | 
				
			||||||
            mx_EventTile_continuation: this.props.tileShape ? '' : this.props.continuation,
 | 
					            mx_EventTile_continuation: this.props.tileShape ? '' : this.props.continuation,
 | 
				
			||||||
            mx_EventTile_last: this.props.last,
 | 
					            mx_EventTile_last: this.props.last,
 | 
				
			||||||
            mx_EventTile_contextual: this.props.contextual,
 | 
					            mx_EventTile_contextual: this.props.contextual,
 | 
				
			||||||
            menu: this.state.menu,
 | 
					            menu: this.state.menu,
 | 
				
			||||||
            mx_EventTile_verified: this.state.verified == true,
 | 
					            mx_EventTile_verified: this.state.verified === true,
 | 
				
			||||||
            mx_EventTile_unverified: this.state.verified == false,
 | 
					            mx_EventTile_unverified: this.state.verified === false,
 | 
				
			||||||
            mx_EventTile_bad: isEncryptionFailure,
 | 
					            mx_EventTile_bad: isEncryptionFailure,
 | 
				
			||||||
            mx_EventTile_emote: msgtype === 'm.emote',
 | 
					            mx_EventTile_emote: msgtype === 'm.emote',
 | 
				
			||||||
            mx_EventTile_redacted: isRedacted,
 | 
					            mx_EventTile_redacted: isRedacted,
 | 
				
			||||||
| 
						 | 
					@ -522,7 +517,8 @@ module.exports = withMatrixClient(React.createClass({
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const readAvatars = this.getReadAvatars();
 | 
					        const readAvatars = this.getReadAvatars();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let avatar, sender;
 | 
					        let avatar;
 | 
				
			||||||
 | 
					        let sender;
 | 
				
			||||||
        let avatarSize;
 | 
					        let avatarSize;
 | 
				
			||||||
        let needsSenderProfile;
 | 
					        let needsSenderProfile;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue