Make client -> device connection synchronous
Summary:
devices not always being readily available is causes a lot of complication in the api,
figured to resolve devices first before construction clients,
since clients not attached to a device are shown uncategorized anyway, making them practically un-interactable.
For more background info, see following chat.
{F344388883}
This diff will make it possible to only expose a synchronous api in Sandy
n.b. didn't update Navigation plugin, as that is done in a next diff
Reviewed By: jknoxville
Differential Revision: D24858332
fbshipit-source-id: 8339f831fbbc9c219add56a199364fde67adafc7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fd8065eb7a
commit
9b4e7e873c
@@ -285,10 +285,17 @@ export class FlipperPlugin<
|
||||
client: PluginClient;
|
||||
realClient: Client;
|
||||
|
||||
/**
|
||||
* @deprecated use .device instead
|
||||
*/
|
||||
getDevice(): Promise<BaseDevice> {
|
||||
return this.realClient.device;
|
||||
}
|
||||
|
||||
get device() {
|
||||
return this.realClient.deviceSync;
|
||||
}
|
||||
|
||||
_teardown() {
|
||||
// automatically unsubscribe subscriptions
|
||||
const pluginId = this.constructor.id;
|
||||
|
||||
Reference in New Issue
Block a user