Expose activated state to plugins
Reviewed By: LukeDefeo Differential Revision: D47365658 fbshipit-source-id: 4ce2a65e9439c51e635548d84a25a2cdcde9a0d3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0e01fcad44
commit
7644c9092a
@@ -50,6 +50,8 @@ export interface PluginClient<
|
|||||||
*/
|
*/
|
||||||
readonly appName: string;
|
readonly appName: string;
|
||||||
|
|
||||||
|
readonly isActivated: () => boolean;
|
||||||
|
|
||||||
readonly isConnected: boolean;
|
readonly isConnected: boolean;
|
||||||
readonly connected: ReadOnlyAtom<boolean>;
|
readonly connected: ReadOnlyAtom<boolean>;
|
||||||
|
|
||||||
@@ -176,6 +178,9 @@ export class SandyPluginInstance extends BasePluginInstance {
|
|||||||
const self = this;
|
const self = this;
|
||||||
this.client = {
|
this.client = {
|
||||||
...this.createBasePluginClient(),
|
...this.createBasePluginClient(),
|
||||||
|
isActivated() {
|
||||||
|
return self.activated;
|
||||||
|
},
|
||||||
get appId() {
|
get appId() {
|
||||||
return realClient.id;
|
return realClient.id;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user