Merge branch 'develop' into matthew/status
This commit is contained in:
commit
8587b36715
4 changed files with 18 additions and 9 deletions
|
@ -137,16 +137,19 @@ export default React.createClass({
|
||||||
<div className="mx_CreateGroupDialog_label">
|
<div className="mx_CreateGroupDialog_label">
|
||||||
<label htmlFor="groupid">{ _t('Community ID') }</label>
|
<label htmlFor="groupid">{ _t('Community ID') }</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="mx_CreateGroupDialog_input_group">
|
||||||
<span>+</span>
|
<span className="mx_CreateGroupDialog_prefix">+</span>
|
||||||
<input id="groupid" className="mx_CreateGroupDialog_input"
|
<input id="groupid"
|
||||||
|
className="mx_CreateGroupDialog_input mx_CreateGroupDialog_input_hasPrefixAndSuffix"
|
||||||
size="32"
|
size="32"
|
||||||
placeholder={_t('example')}
|
placeholder={_t('example')}
|
||||||
onChange={this._onGroupIdChange}
|
onChange={this._onGroupIdChange}
|
||||||
onBlur={this._onGroupIdBlur}
|
onBlur={this._onGroupIdBlur}
|
||||||
value={this.state.groupId}
|
value={this.state.groupId}
|
||||||
/>
|
/>
|
||||||
<span>:{ MatrixClientPeg.get().getDomain() }</span>
|
<span className="mx_CreateGroupDialog_suffix">
|
||||||
|
:{ MatrixClientPeg.get().getDomain() }
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="error">
|
<div className="error">
|
||||||
|
|
|
@ -26,11 +26,9 @@ class MenuOption extends React.Component {
|
||||||
this._onClick = this._onClick.bind(this);
|
this._onClick = this._onClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDefaultProps() {
|
static defaultProps = {
|
||||||
return {
|
disabled: false,
|
||||||
disabled: false,
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
_onMouseEnter() {
|
_onMouseEnter() {
|
||||||
this.props.onMouseEnter(this.props.dropdownKey);
|
this.props.onMouseEnter(this.props.dropdownKey);
|
||||||
|
|
|
@ -49,6 +49,7 @@ const RoomDetailRow = React.createClass({
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: this.props.room.roomId,
|
room_id: this.props.room.roomId,
|
||||||
|
room_alias: this.props.room.canonicalAlias || (this.props.room.aliases || [])[0],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,9 @@ class FlairStore extends EventEmitter {
|
||||||
// reject: () => {}
|
// reject: () => {}
|
||||||
// }
|
// }
|
||||||
};
|
};
|
||||||
|
this._usersInFlight = {
|
||||||
|
// This has the same schema as _usersPending
|
||||||
|
};
|
||||||
|
|
||||||
this._debounceTimeoutID = null;
|
this._debounceTimeoutID = null;
|
||||||
}
|
}
|
||||||
|
@ -125,12 +128,16 @@ class FlairStore extends EventEmitter {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Propagate the same error to all usersInFlight
|
// Propagate the same error to all usersInFlight
|
||||||
Object.keys(this._usersInFlight).forEach((userId) => {
|
Object.keys(this._usersInFlight).forEach((userId) => {
|
||||||
|
// The promise should always exist for userId, but do a null-check anyway
|
||||||
|
if (!this._usersInFlight[userId]) return;
|
||||||
this._usersInFlight[userId].reject(err);
|
this._usersInFlight[userId].reject(err);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const updatedUserGroups = resp.users;
|
const updatedUserGroups = resp.users;
|
||||||
Object.keys(this._usersInFlight).forEach((userId) => {
|
Object.keys(this._usersInFlight).forEach((userId) => {
|
||||||
|
// The promise should always exist for userId, but do a null-check anyway
|
||||||
|
if (!this._usersInFlight[userId]) return;
|
||||||
this._usersInFlight[userId].resolve(updatedUserGroups[userId] || []);
|
this._usersInFlight[userId].resolve(updatedUserGroups[userId] || []);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue