From 0473b14564bccb2e2c60695b7ac566d075ca2c75 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 14 Sep 2016 01:25:43 +0100 Subject: [PATCH] fix e2e icon transitions --- src/components/views/rooms/EventTile.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 44f2050c51..346a1b7c99 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -408,7 +408,7 @@ module.exports = React.createClass({ mx_EventTile_last: this.props.last, mx_EventTile_contextual: this.props.contextual, menu: this.state.menu, - mx_EventTile_verified: this.state.verified == true || (e2eEnabled && isSending), + mx_EventTile_verified: this.state.verified == true || (e2eEnabled && this.props.eventSendStatus), mx_EventTile_unverified: this.state.verified == false, mx_EventTile_bad: this.props.mxEvent.getContent().msgtype === 'm.bad.encrypted', }); @@ -466,20 +466,20 @@ module.exports = React.createClass({ ); var e2e; - if (e2eEnabled) { + if (this.props.mxEvent.isEncrypted() || (e2eEnabled && this.props.eventSendStatus)) { if (this.props.mxEvent.getContent().msgtype === 'm.bad.encrypted') { e2e = ; } - else if (this.state.verified == true) { - e2e = Encrypted by a verified device; - } - else if (this.state.verified == false) { - e2e = Encrypted by an unverified device!; + else if (this.state.verified == true || (e2eEnabled && this.props.eventSendStatus)) { + e2e = Encrypted by a verified device; } else { - e2e = ; + e2e = Encrypted by an unverified device!; } } + else if (e2eEnabled) { + e2e = ; + } if (this.props.tileShape === "notif") { var room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());