From 7644c9092aae29b00dea57c2c8c774dff265ac5a Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Wed, 12 Jul 2023 08:56:50 -0700 Subject: [PATCH] Expose activated state to plugins Reviewed By: LukeDefeo Differential Revision: D47365658 fbshipit-source-id: 4ce2a65e9439c51e635548d84a25a2cdcde9a0d3 --- desktop/flipper-plugin-core/src/plugin/Plugin.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/flipper-plugin-core/src/plugin/Plugin.tsx b/desktop/flipper-plugin-core/src/plugin/Plugin.tsx index 6cdea873e..6a96dee5e 100644 --- a/desktop/flipper-plugin-core/src/plugin/Plugin.tsx +++ b/desktop/flipper-plugin-core/src/plugin/Plugin.tsx @@ -50,6 +50,8 @@ export interface PluginClient< */ readonly appName: string; + readonly isActivated: () => boolean; + readonly isConnected: boolean; readonly connected: ReadOnlyAtom; @@ -176,6 +178,9 @@ export class SandyPluginInstance extends BasePluginInstance { const self = this; this.client = { ...this.createBasePluginClient(), + isActivated() { + return self.activated; + }, get appId() { return realClient.id; },