@@ -10,7 +10,7 @@ import { Provider } from "react-redux";
10
10
11
11
import FmsFileExplorer from "../../../core/App" ;
12
12
import { PersistedConfigKeys } from "../../../core/services" ;
13
- import { createReduxStore , interaction } from "../../../core/state" ;
13
+ import { createReduxStore , interaction , selection } from "../../../core/state" ;
14
14
15
15
import ApplicationInfoServiceElectron from "../services/ApplicationInfoServiceElectron" ;
16
16
import ExecutionEnvServiceElectron from "../services/ExecutionEnvServiceElectron" ;
@@ -73,19 +73,20 @@ const store = createReduxStore({
73
73
store . subscribe ( ( ) => {
74
74
const state = store . getState ( ) ;
75
75
const csvColumns = interaction . selectors . getCsvColumns ( state ) ;
76
+ const displayAnnotations = selection . selectors . getAnnotationsToDisplay ( state ) ;
76
77
const userSelectedApplications = interaction . selectors . getUserSelectedApplications ( state ) ;
77
- const hasUsedApplicationBefore = interaction . selectors . hasUsedApplicationBefore ( state ) ;
78
78
const appState = {
79
79
[ PersistedConfigKeys . CsvColumns ] : csvColumns ,
80
+ [ PersistedConfigKeys . DisplayAnnotations ] : displayAnnotations . map ( ( annotation ) => ( {
81
+ annotationDisplayName : annotation . displayName ,
82
+ annotationName : annotation . name ,
83
+ description : annotation . description ,
84
+ type : annotation . type ,
85
+ } ) ) ,
80
86
[ PersistedConfigKeys . UserSelectedApplications ] : userSelectedApplications ,
87
+ [ PersistedConfigKeys . HasUsedApplicationBefore ] : true ,
81
88
} ;
82
- if ( JSON . stringify ( appState ) !== JSON . stringify ( persistentConfigService . getAll ( ) ) ) {
83
- persistentConfigService . persist ( {
84
- [ PersistedConfigKeys . CsvColumns ] : csvColumns ,
85
- [ PersistedConfigKeys . UserSelectedApplications ] : userSelectedApplications ,
86
- [ PersistedConfigKeys . HasUsedApplicationBefore ] : hasUsedApplicationBefore ,
87
- } ) ;
88
- }
89
+ persistentConfigService . persist ( appState ) ;
89
90
} ) ;
90
91
91
92
function renderFmsFileExplorer ( ) {
0 commit comments