Refactor CrashReporter plugin
Summary: This diff refactors CrashReporter Plugin. The business logic of crash reporter plugin was placed in the `iOSDevice.js` as it gets the hook to the initialisation of iOSDevice. This diff moves the business logic to the Crash Reporter plugin files under the plugins folder. To get the hook, so that we can add our watcher, I have added a static function over `FlipperBasePlugin`, which if exists, will be called once `REGISTER_PLUGIN` event is dispatched Reviewed By: danielbuechele Differential Revision: D13529035 fbshipit-source-id: 28216b273b4032727859107d8a6751c6465af9ac
This commit is contained in:
committed by
Facebook Github Bot
parent
780ac863b8
commit
9d4bb45dbc
@@ -9,6 +9,7 @@ import type {KeyboardActions} from './MenuBar.js';
|
||||
import type {App} from './App.js';
|
||||
import type Logger from './fb-stubs/Logger.js';
|
||||
import type Client from './Client.js';
|
||||
import type {Store} from './reducers/index.js';
|
||||
|
||||
import React from 'react';
|
||||
import type {Node} from 'react';
|
||||
@@ -69,6 +70,13 @@ export class FlipperBasePlugin<
|
||||
static getActiveNotifications: ?(
|
||||
persistedState: PersistedState,
|
||||
) => Array<Notification>;
|
||||
static onRegisterPlugin: ?(
|
||||
store: Store,
|
||||
setPersistedState: (
|
||||
pluginKey: string,
|
||||
newPluginState: ?PersistedState,
|
||||
) => void,
|
||||
) => void;
|
||||
// forbid instance properties that should be static
|
||||
title: empty;
|
||||
id: empty;
|
||||
|
||||
Reference in New Issue
Block a user