Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Clean up UserSettings for linting
Browse files Browse the repository at this point in the history
Signed-off-by: Travis Ralston <[email protected]>
  • Loading branch information
turt2live committed Sep 14, 2017
1 parent 4579d20 commit c0f4c3f
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,6 @@ const IgnoredUser = React.createClass({
},

render: function() {
let unbanButton;

if (this.props.canUnban) {
unbanButton = <AccessibleButton className="mx_RoomSettings_unbanButton" onClick={this._onUnbanClick}>
{ _t('Unban') }
</AccessibleButton>;
}

return (
<li>
<AccessibleButton onClick={this._onUnignoreClick} className="mx_UserSettings_button mx_UserSettings_buttonSmall">
Expand Down Expand Up @@ -243,7 +235,7 @@ module.exports = React.createClass({
vectorVersion: undefined,
rejectingInvites: false,
mediaDevices: null,
ignoredUsers: []
ignoredUsers: [],
};
},

Expand Down Expand Up @@ -385,14 +377,13 @@ module.exports = React.createClass({
},

_refreshIgnoredUsers: function(userIdUnignored=null) {
let users = MatrixClientPeg.get().getIgnoredUsers();
const users = MatrixClientPeg.get().getIgnoredUsers();
if (userIdUnignored) {
var index = users.indexOf(userIdUnignored);
const index = users.indexOf(userIdUnignored);
if (index !== -1) users.splice(index, 1);
}
console.log("Updating ignored users: "+JSON.stringify(users));
this.setState({
ignoredUsers: users
ignoredUsers: users,
});
},

Expand Down Expand Up @@ -855,7 +846,9 @@ module.exports = React.createClass({
<div className="mx_UserSettings_section mx_UserSettings_ignoredUsersSection">
<ul>
{this.state.ignoredUsers.map(function(userId) {
return (<IgnoredUser key={userId} userId={userId} onUnignored={updateHandler}></IgnoredUser>);
return (<IgnoredUser key={userId}
userId={userId}
onUnignored={updateHandler}></IgnoredUser>);
})}
</ul>
</div>
Expand Down

0 comments on commit c0f4c3f

Please sign in to comment.