mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Merge pull request #1080 from matrix-org/luke/fix-start-1-1-regression
Fix regressions with starting a 1-1.
This commit is contained in:
commit
701242a36b
@ -24,6 +24,7 @@ import DMRoomMap from '../../../utils/DMRoomMap';
|
|||||||
import Modal from '../../../Modal';
|
import Modal from '../../../Modal';
|
||||||
import AccessibleButton from '../elements/AccessibleButton';
|
import AccessibleButton from '../elements/AccessibleButton';
|
||||||
import q from 'q';
|
import q from 'q';
|
||||||
|
import dis from '../../../dispatcher';
|
||||||
|
|
||||||
const TRUNCATE_QUERY_LIST = 40;
|
const TRUNCATE_QUERY_LIST = 40;
|
||||||
const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200;
|
const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200;
|
||||||
@ -102,7 +103,7 @@ module.exports = React.createClass({
|
|||||||
const ChatCreateOrReuseDialog = sdk.getComponent(
|
const ChatCreateOrReuseDialog = sdk.getComponent(
|
||||||
"views.dialogs.ChatCreateOrReuseDialog",
|
"views.dialogs.ChatCreateOrReuseDialog",
|
||||||
);
|
);
|
||||||
Modal.createDialog(ChatCreateOrReuseDialog, {
|
const close = Modal.createDialog(ChatCreateOrReuseDialog, {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
onFinished: (success) => {
|
onFinished: (success) => {
|
||||||
this.props.onFinished(success);
|
this.props.onFinished(success);
|
||||||
@ -112,14 +113,16 @@ module.exports = React.createClass({
|
|||||||
action: 'start_chat',
|
action: 'start_chat',
|
||||||
user_id: userId,
|
user_id: userId,
|
||||||
});
|
});
|
||||||
|
close(true);
|
||||||
},
|
},
|
||||||
onExistingRoomSelected: (roomId) => {
|
onExistingRoomSelected: (roomId) => {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
user_id: roomId,
|
room_id: roomId,
|
||||||
});
|
});
|
||||||
|
close(true);
|
||||||
},
|
},
|
||||||
});
|
}).close;
|
||||||
} else {
|
} else {
|
||||||
this._startChat(inviteList);
|
this._startChat(inviteList);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user