Plugin Marketplace state refresh and cache
Summary: Separate dispatcher for periodic refreshing available plugins data from the Marketplace backend and caching it locally. The plugin auto update downloader subscribes to these state refreshes and automatically schedules plugin update downloads when required. Reviewed By: passy Differential Revision: D25360897 fbshipit-source-id: 5b6d95b63ff47b8ae9ad8b12e2480d1fed524ca5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5b26f36672
commit
f3e1a48ff3
12
desktop/app/src/dispatcher/fb-stubs/pluginMarketplace.tsx
Normal file
12
desktop/app/src/dispatcher/fb-stubs/pluginMarketplace.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export default () => {
|
||||
// Marketplace is not implemented in public version of Flipper
|
||||
};
|
||||
@@ -21,6 +21,7 @@ import user from './user';
|
||||
import pluginManager from './pluginManager';
|
||||
import reactNative from './reactNative';
|
||||
import pluginAutoUpdate from './fb-stubs/pluginAutoUpdate';
|
||||
import pluginMarketplace from './fb-stubs/pluginMarketplace';
|
||||
|
||||
import {Logger} from '../fb-interfaces/Logger';
|
||||
import {Store} from '../reducers/index';
|
||||
@@ -33,7 +34,6 @@ export default function (store: Store, logger: Logger): () => Promise<void> {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
remote.globalShortcut.unregisterAll();
|
||||
}
|
||||
|
||||
const dispatchers: Array<Dispatcher> = [
|
||||
application,
|
||||
store.getState().settingsState.enableAndroid ? androidDevice : null,
|
||||
@@ -48,6 +48,7 @@ export default function (store: Store, logger: Logger): () => Promise<void> {
|
||||
pluginManager,
|
||||
reactNative,
|
||||
pluginAutoUpdate,
|
||||
pluginMarketplace,
|
||||
].filter(notNull);
|
||||
const globalCleanup = dispatchers
|
||||
.map((dispatcher) => dispatcher(store, logger))
|
||||
|
||||
Reference in New Issue
Block a user