Highlight messages using new push rules support in js sdk
parent
9aa9a60333
commit
57ba816919
|
@ -24,3 +24,7 @@ limitations under the License.
|
|||
.mx_MessageTile.not_sent {
|
||||
color: #f11;
|
||||
}
|
||||
|
||||
.mx_MessageTile.highlight {
|
||||
color: #00f;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ module.exports = React.createClass({
|
|||
var classes = classNames({
|
||||
mx_MessageTile: true,
|
||||
sending: this.props.mxEvent.status == 'sending',
|
||||
not_sent: this.props.mxEvent.status == 'not_sent'
|
||||
not_sent: this.props.mxEvent.status == 'not_sent',
|
||||
highlight: this.shouldHighlight()
|
||||
});
|
||||
return (
|
||||
<div className={classes}>
|
||||
|
|
|
@ -16,6 +16,13 @@ limitations under the License.
|
|||
|
||||
'use strict';
|
||||
|
||||
var MatrixClientPeg = require("../../MatrixClientPeg");
|
||||
|
||||
module.exports = {
|
||||
shouldHighlight: function() {
|
||||
var actions = this.props.mxEvent.getPushActions(MatrixClientPeg.get());
|
||||
if (!actions || !actions.tweaks) { return false; }
|
||||
return actions.tweaks.highlight;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue