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:
committed by
Facebook Github Bot
parent
9a8e30681b
commit
3caa0da887
@@ -535,12 +535,12 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.client.send('setHighlighted', {
|
this.client.call('setHighlighted', {
|
||||||
id: selected,
|
id: selected,
|
||||||
isAlignmentMode: this.state.isAlignmentMode,
|
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 = () => {
|
onFindClick = () => {
|
||||||
const isSearchActive = !this.state.isSearchActive;
|
const isSearchActive = !this.state.isSearchActive;
|
||||||
this.dispatchAction({isSearchActive, type: 'SetSearchActive'});
|
this.dispatchAction({isSearchActive, type: 'SetSearchActive'});
|
||||||
this.client.send('setSearchActive', {active: isSearchActive});
|
this.client.call('setSearchActive', {active: isSearchActive});
|
||||||
};
|
};
|
||||||
|
|
||||||
onToggleAccessibility = () => {
|
onToggleAccessibility = () => {
|
||||||
@@ -890,7 +890,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
|
|
||||||
// only force render if litho accessibility is included in app
|
// only force render if litho accessibility is included in app
|
||||||
if (showLithoAccessibilitySettings) {
|
if (showLithoAccessibilitySettings) {
|
||||||
this.client.send('forceLithoAXRender', {
|
this.client.call('forceLithoAXRender', {
|
||||||
forceLithoAXRender: inAXMode && forceLithoAXRender,
|
forceLithoAXRender: inAXMode && forceLithoAXRender,
|
||||||
applicationId: AXroot,
|
applicationId: AXroot,
|
||||||
});
|
});
|
||||||
@@ -903,7 +903,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
const forceLithoAXRender = !this.state.forceLithoAXRender;
|
const forceLithoAXRender = !this.state.forceLithoAXRender;
|
||||||
const applicationId = this.state.AXroot;
|
const applicationId = this.state.AXroot;
|
||||||
this.dispatchAction({forceLithoAXRender, type: 'SetLithoRenderMode'});
|
this.dispatchAction({forceLithoAXRender, type: 'SetLithoRenderMode'});
|
||||||
this.client.send('forceLithoAXRender', {
|
this.client.call('forceLithoAXRender', {
|
||||||
forceLithoAXRender: forceLithoAXRender,
|
forceLithoAXRender: forceLithoAXRender,
|
||||||
applicationId,
|
applicationId,
|
||||||
});
|
});
|
||||||
@@ -964,7 +964,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
const {key, AXkey} = this.getKeysFromSelected(selectedKey);
|
const {key, AXkey} = this.getKeysFromSelected(selectedKey);
|
||||||
this.dispatchAction({key, AXkey, type: 'SelectElement'});
|
this.dispatchAction({key, AXkey, type: 'SelectElement'});
|
||||||
|
|
||||||
this.client.send('setHighlighted', {
|
this.client.call('setHighlighted', {
|
||||||
id: selectedKey,
|
id: selectedKey,
|
||||||
isAlignmentMode: this.state.isAlignmentMode,
|
isAlignmentMode: this.state.isAlignmentMode,
|
||||||
});
|
});
|
||||||
@@ -991,7 +991,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onElementHovered = debounce((key: ?ElementID) => {
|
onElementHovered = debounce((key: ?ElementID) => {
|
||||||
this.client.send('setHighlighted', {
|
this.client.call('setHighlighted', {
|
||||||
id: key,
|
id: key,
|
||||||
isAlignmentMode: this.state.isAlignmentMode,
|
isAlignmentMode: this.state.isAlignmentMode,
|
||||||
});
|
});
|
||||||
@@ -1002,7 +1002,7 @@ export default class Layout extends FlipperPlugin<InspectorState> {
|
|||||||
{
|
{
|
||||||
label: 'Focus',
|
label: 'Focus',
|
||||||
click: (id: ElementID) => {
|
click: (id: ElementID) => {
|
||||||
this.client.send('onRequestAXFocus', {id});
|
this.client.call('onRequestAXFocus', {id});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user