You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Convert ternary to multiple if statements for clarity
This commit is contained in:
@@ -581,11 +581,14 @@ module.exports = withMatrixClient(React.createClass({
|
|||||||
// Hopefully all of that leads to us not reading out messages in duplicate or triplicate.
|
// Hopefully all of that leads to us not reading out messages in duplicate or triplicate.
|
||||||
const sentByMyUserId = this.props.mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
const sentByMyUserId = this.props.mxEvent.getSender() === MatrixClientPeg.get().getUserId();
|
||||||
const sentByThisDevice = !!this.props.mxEvent.getUnsigned()["transaction_id"];
|
const sentByThisDevice = !!this.props.mxEvent.getUnsigned()["transaction_id"];
|
||||||
const screenReaderShouldSpeak = isSending ? false : (
|
let screenReaderShouldSpeak = false;
|
||||||
this.props.eventSendStatus
|
if (!isSending) {
|
||||||
? sentByMyUserId && this.props.eventSendStatus === 'sent'
|
if (this.props.eventSendStatus === 'sent') {
|
||||||
: !sentByMyUserId || !sentByThisClient
|
screenReaderShouldSpeak = sentByMyUserId;
|
||||||
);
|
} else if (!this.props.eventSendStatus) {
|
||||||
|
screenReaderShouldSpeak = !sentByMyUserId || !sentByThisDevice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const classes = classNames({
|
const classes = classNames({
|
||||||
mx_EventTile: true,
|
mx_EventTile: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user