mirror of https://github.com/vector-im/riot-web
profoundly evil ugly hack to workaround amandine's invite focus issues on her note-to-self rooms
parent
7fb5736e52
commit
2403eca6af
|
@ -442,7 +442,12 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// XXX: EVIL HACK to autofocus inviting on empty rooms.
|
// XXX: EVIL HACK to autofocus inviting on empty rooms.
|
||||||
// We use the setTimeout to avoid racing with focus_composer.
|
// We use the setTimeout to avoid racing with focus_composer.
|
||||||
if (this.state.room && this.state.room.getJoinedMembers().length == 1) {
|
if (this.state.room &&
|
||||||
|
this.state.room.getJoinedMembers().length == 1 &&
|
||||||
|
this.state.room.getLiveTimeline() &&
|
||||||
|
this.state.room.getLiveTimeline().getEvents() &&
|
||||||
|
this.state.room.getLiveTimeline().getEvents().length <= 6)
|
||||||
|
{
|
||||||
var inviteBox = document.getElementById("mx_SearchableEntityList_query");
|
var inviteBox = document.getElementById("mx_SearchableEntityList_query");
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (inviteBox) {
|
if (inviteBox) {
|
||||||
|
|
Loading…
Reference in New Issue