Store use selected plugin after reconnect

Summary:
Deselect plugin when app disconnects, but store the information that the users had the app selected. When the app conencts again, restore the user's selection.
This also stores the device seleced by the user and reselects the device if it connects.

Reviewed By: xiphirx

Differential Revision: D8833948

fbshipit-source-id: ad3ef54681550ae674bdd4e695d677aea5c14588
This commit is contained in:
Daniel Büchele
2018-07-31 07:37:18 -07:00
committed by Pascal Hartig
parent a8138984f9
commit 1f977f4844
8 changed files with 109 additions and 75 deletions

View File

@@ -8,8 +8,8 @@
import {combineReducers} from 'redux';
import application from './application.js';
import connections from './connections.js';
import server from './server.js';
import pluginStates from './pluginStates.js';
import type {
State as ApplicationState,
Action as ApplicationAction,
@@ -22,7 +22,6 @@ import type {
State as PluginsState,
Action as PluginsAction,
} from './pluginStates.js';
import type {State as ServerState, Action as ServerAction} from './server.js';
import type {Store as ReduxStore} from 'redux';
export type Store = ReduxStore<
@@ -30,14 +29,12 @@ export type Store = ReduxStore<
application: ApplicationState,
connections: DevicesState,
pluginStates: PluginsState,
server: ServerState,
},
ApplicationAction | DevicesAction | PluginsAction | ServerAction,
ApplicationAction | DevicesAction | PluginsAction,
>;
export default combineReducers({
application,
connections,
pluginStates,
server,
});