make hiding redactions use new pattern
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
cebb7182f0
commit
f0f721aa32
|
@ -252,6 +252,9 @@ module.exports = React.createClass({
|
||||||
// Always show highlighted event
|
// Always show highlighted event
|
||||||
if (this.props.highlightedEventId === mxEv.getId()) return true;
|
if (this.props.highlightedEventId === mxEv.getId()) return true;
|
||||||
|
|
||||||
|
// Hide redactions if behaviour enabled
|
||||||
|
if (mxEv.isRedacted() && this.props.hideRedactions) return false;
|
||||||
|
|
||||||
const isMemberEvent = mxEv.getType() === "m.room.member" && mxEv.getStateKey() !== undefined;
|
const isMemberEvent = mxEv.getType() === "m.room.member" && mxEv.getStateKey() !== undefined;
|
||||||
if (!isMemberEvent) {
|
if (!isMemberEvent) {
|
||||||
return true; // bail early: all the checks below concern member events only
|
return true; // bail early: all the checks below concern member events only
|
||||||
|
@ -511,8 +514,6 @@ module.exports = React.createClass({
|
||||||
continuation = false;
|
continuation = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mxEv.isRedacted() && this.props.hideRedactions) return ret;
|
|
||||||
|
|
||||||
var eventId = mxEv.getId();
|
var eventId = mxEv.getId();
|
||||||
var highlight = (eventId == this.props.highlightedEventId);
|
var highlight = (eventId == this.props.highlightedEventId);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue