You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Add listener to close stickerpicker.
This commit is contained in:
@ -57,7 +57,6 @@ export default class IntegrationManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
integType = 'type_' + integType;
|
integType = 'type_' + integType;
|
||||||
console.warn("Current room", RoomViewStore.getRoomId());
|
|
||||||
const src = (global.im.client && global.im.client.hasCredentials()) ?
|
const src = (global.im.client && global.im.client.hasCredentials()) ?
|
||||||
global.im.client.getScalarInterfaceUrlForRoom(
|
global.im.client.getScalarInterfaceUrlForRoom(
|
||||||
RoomViewStore.getRoomId(),
|
RoomViewStore.getRoomId(),
|
||||||
|
@ -198,6 +198,9 @@ export default class WidgetMessaging extends MatrixPostMessageApi {
|
|||||||
} else if (action === 'sticker_message') {
|
} else if (action === 'sticker_message') {
|
||||||
dis.dispatch({action: 'sticker_message', data: event.data.widgetData, widgetId: event.data.widgetId});
|
dis.dispatch({action: 'sticker_message', data: event.data.widgetData, widgetId: event.data.widgetId});
|
||||||
} else if (action === 'integration_manager_open') {
|
} else if (action === 'integration_manager_open') {
|
||||||
|
// Close the stickerpicker
|
||||||
|
dis.dispatch({action: 'stickerpicker_close'});
|
||||||
|
// Open the integration manager
|
||||||
const data = event.data.widgetData;
|
const data = event.data.widgetData;
|
||||||
const integType = (data && data.integType) ? data.integType : null;
|
const integType = (data && data.integType) ? data.integType : null;
|
||||||
const integId = (data && data.integId) ? data.integId : null;
|
const integId = (data && data.integId) ? data.integId : null;
|
||||||
|
@ -104,6 +104,8 @@ export default class Stickerpicker extends React.Component {
|
|||||||
if (payload.action === "user_widget_updated") {
|
if (payload.action === "user_widget_updated") {
|
||||||
this._getStickerPickerWidget();
|
this._getStickerPickerWidget();
|
||||||
return;
|
return;
|
||||||
|
} else if (payload.action === "stickerpicker_close") {
|
||||||
|
this.stickersMenu.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user