Send deinit message even if the plugin runs in background

Summary: Put back deinit message and send deinit call even if the plugin is the background one

Reviewed By: danielbuechele

Differential Revision: D10300165

fbshipit-source-id: ef945282fe628e9196c21b5060a8e464e98bc94c
This commit is contained in:
Pritesh Nandgaonkar
2018-10-11 15:19:30 -07:00
committed by Facebook Github Bot
parent 396e385651
commit 233b7bcd3c

View File

@@ -165,10 +165,6 @@ export class FlipperPlugin<S = *, A = *, P = *> extends FlipperBasePlugin<
}
_teardown() {
if (this.constructor.persistedStateReducer) {
// do not tear down when persistedStateReducer is set
return;
}
// automatically unsubscribe subscriptions
for (const {method, callback} of this.subscriptions) {
this.realClient.unsubscribe(this.constructor.id, method, callback);