Use call instead of send

Summary: Going to deprecate send, so changing these to call so the plugins can respond to errors.

Reviewed By: passy

Differential Revision: D14066981

fbshipit-source-id: 440563f1bf1a1a145fcfd0e6f36af63bf27836ed
This commit is contained in:
John Knox
2019-02-14 05:15:33 -08:00
committed by Facebook Github Bot
parent 9a8e30681b
commit 3caa0da887

View File

@@ -535,12 +535,12 @@ export default class Layout extends FlipperPlugin<InspectorState> {
});
}
this.client.send('setHighlighted', {
this.client.call('setHighlighted', {
id: selected,
isAlignmentMode: this.state.isAlignmentMode,
});
this.client.send('setSearchActive', {active: false});
this.client.call('setSearchActive', {active: false});
},
);
}
@@ -875,7 +875,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
onFindClick = () => {
const isSearchActive = !this.state.isSearchActive;
this.dispatchAction({isSearchActive, type: 'SetSearchActive'});
this.client.send('setSearchActive', {active: isSearchActive});
this.client.call('setSearchActive', {active: isSearchActive});
};
onToggleAccessibility = () => {
@@ -890,7 +890,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
// only force render if litho accessibility is included in app
if (showLithoAccessibilitySettings) {
this.client.send('forceLithoAXRender', {
this.client.call('forceLithoAXRender', {
forceLithoAXRender: inAXMode && forceLithoAXRender,
applicationId: AXroot,
});
@@ -903,7 +903,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
const forceLithoAXRender = !this.state.forceLithoAXRender;
const applicationId = this.state.AXroot;
this.dispatchAction({forceLithoAXRender, type: 'SetLithoRenderMode'});
this.client.send('forceLithoAXRender', {
this.client.call('forceLithoAXRender', {
forceLithoAXRender: forceLithoAXRender,
applicationId,
});
@@ -964,7 +964,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
const {key, AXkey} = this.getKeysFromSelected(selectedKey);
this.dispatchAction({key, AXkey, type: 'SelectElement'});
this.client.send('setHighlighted', {
this.client.call('setHighlighted', {
id: selectedKey,
isAlignmentMode: this.state.isAlignmentMode,
});
@@ -991,7 +991,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
});
onElementHovered = debounce((key: ?ElementID) => {
this.client.send('setHighlighted', {
this.client.call('setHighlighted', {
id: key,
isAlignmentMode: this.state.isAlignmentMode,
});
@@ -1002,7 +1002,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
{
label: 'Focus',
click: (id: ElementID) => {
this.client.send('onRequestAXFocus', {id});
this.client.call('onRequestAXFocus', {id});
},
},
];