Show a message if a background plugin is not starred
Summary: Since background plugins don't receive data anymore when not starred, we should hint the user about this. For this diff, I reused the existing statusbar. Although this solution is quite ugly, I think it is better than introducing yet another notification / warning mechanism. Probably we should revisit the layout of this status bar in the future. Reviewed By: jknoxville Differential Revision: D19251588 fbshipit-source-id: 1dfd07be383d4ba318f344ebff4b08ed36194c58
This commit is contained in:
committed by
Facebook Github Bot
parent
04fcaddded
commit
9acf23596e
@@ -33,7 +33,7 @@ import React, {PureComponent} from 'react';
|
||||
import {connect, ReactReduxContext} from 'react-redux';
|
||||
import {setPluginState} from './reducers/pluginStates';
|
||||
import {selectPlugin} from './reducers/connections';
|
||||
import {State as Store} from './reducers/index';
|
||||
import {State as Store, MiddlewareAPI} from './reducers/index';
|
||||
import {activateMenuItems} from './MenuBar';
|
||||
import {Message} from './reducers/pluginMessageQueue';
|
||||
import {Idler} from './utils/Idler';
|
||||
@@ -146,6 +146,10 @@ class PluginContainer extends PureComponent<Props, State> {
|
||||
|
||||
state = {progress: {current: 0, total: 0}};
|
||||
|
||||
get store(): MiddlewareAPI {
|
||||
return this.context.store;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.plugin) {
|
||||
this.plugin._teardown();
|
||||
@@ -179,7 +183,7 @@ class PluginContainer extends PureComponent<Props, State> {
|
||||
processMessageQueue(
|
||||
activePlugin,
|
||||
pluginKey,
|
||||
this.context.store,
|
||||
this.store,
|
||||
progress => {
|
||||
this.setState({progress});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user