diff --git a/src/NotificationsHub.tsx b/src/NotificationsHub.tsx index e8ab8834b..25d0c3b4f 100644 --- a/src/NotificationsHub.tsx +++ b/src/NotificationsHub.tsx @@ -21,14 +21,12 @@ import { styled, colors, } from 'flipper'; -import {FlipperDevicePlugin, BaseAction} from './plugin'; -import {connect, ReactReduxContext} from 'react-redux'; -import {store} from './store'; +import {FlipperDevicePlugin} from './plugin'; +import {connect} from 'react-redux'; import React, {Component, Fragment} from 'react'; import {clipboard} from 'electron'; import { PluginNotification, - clearAllNotifications, updatePluginBlacklist, updateCategoryBlacklist, } from './reducers/notifications'; @@ -36,70 +34,6 @@ import {selectPlugin} from './reducers/connections'; import {State as StoreState} from './reducers/index'; import textContent from './utils/textContent'; import createPaste from './fb-stubs/createPaste'; -import {KeyboardActions} from './MenuBar'; -import {Store} from 'redux'; - -export default class Notifications< - S, - A extends BaseAction, - P -> extends FlipperDevicePlugin { - static id = 'notifications'; - static title = 'Notifications'; - static icon = 'bell'; - static keyboardActions: KeyboardActions = ['clear']; - - static supportsDevice() { - return false; - } - - onKeyboardAction = (action: string) => { - if (action === 'clear') { - this.onClear(store)(); - } - }; - - onClear = (store: Store) => () => { - store.dispatch(clearAllNotifications()); - }; - - render() { - return ( - - {({store}) => { - const {blacklistedPlugins, blacklistedCategories} = (store as Store< - StoreState - >).getState().notifications; - return ( - ({ - value, - type: 'exclude', - key: 'plugin', - })), - ...blacklistedCategories.map(value => ({ - value, - type: 'exclude', - key: 'category', - })), - ]} - actions={ - - - - } - /> - ); - }} - - ); - } -} type OwnProps = { onClear: () => void; diff --git a/src/PluginContainer.tsx b/src/PluginContainer.tsx index 548ba8106..a175c873d 100644 --- a/src/PluginContainer.tsx +++ b/src/PluginContainer.tsx @@ -30,7 +30,6 @@ import {connect} from 'react-redux'; import {setPluginState} from './reducers/pluginStates'; import {selectPlugin} from './reducers/connections'; import {State as Store} from './reducers/index'; -import NotificationsHub from './NotificationsHub'; import {activateMenuItems} from './MenuBar'; const Container = styled(FlexColumn)({ @@ -196,11 +195,7 @@ export default connect( | null = null; if (selectedPlugin) { - if (selectedPlugin === NotificationsHub.id) { - activePlugin = NotificationsHub; - } else if (selectedPlugin) { - activePlugin = devicePlugins.get(selectedPlugin) || null; - } + activePlugin = devicePlugins.get(selectedPlugin) || null; target = selectedDevice; if (selectedDevice && activePlugin) { pluginKey = getPluginKey(selectedDevice.serial, activePlugin.id);