1
1
import * as React from 'react' ;
2
2
import * as ReactDOM from 'react-dom' ;
3
- import { sideElement , SideRoot } from './components/SidePanel' ;
4
- import { loadPolyfills , render } from 'core-coderoad' ;
5
- import Subscriptions from './subscriptions' ;
3
+
4
+ import { SideRoot , sideElement } from './components/SidePanel' ;
6
5
import addToStatusBar from './components/StatusBar' ;
7
- // activate Redux
8
- import store from './store' ;
9
6
import { setupVerify } from './modules/setup' ;
7
+ import store from './store' ;
8
+ import Subscriptions from './subscriptions' ;
9
+ import { loadPolyfills , render } from 'core-coderoad' ;
10
10
import * as injectTapEventPlugin from 'react-tap-event-plugin' ;
11
11
12
12
class Main {
13
- side : HTMLElement ;
14
- statusBarTile : StatusBar . IStatusBarView ;
15
- subscriptions : any ;
13
+ private side : HTMLElement ;
14
+ private statusBarTile : StatusBar . IStatusBarView ;
15
+ private subscriptions : any ;
16
16
constructor ( ) {
17
17
injectTapEventPlugin ( ) ; // remove later
18
18
loadPolyfills ( ) ;
19
19
// run startup checks
20
20
store . dispatch ( setupVerify ( ) ) ;
21
21
this . side = sideElement . init ( ) ;
22
- this . subscriptions = new Subscriptions ;
22
+ this . subscriptions = new Subscriptions ( ) ;
23
23
}
24
- activate ( ) : void {
24
+ public activate ( ) : void {
25
25
// create atom panel
26
26
atom . workspace . addRightPanel ( {
27
27
item : this . side ,
@@ -32,10 +32,7 @@ class Main {
32
32
// render React component
33
33
ReactDOM . render ( SideRoot ( store ) , this . side ) ;
34
34
}
35
- consumeStatusBar ( statusBar ) {
36
- this . statusBarTile = addToStatusBar ( store , statusBar ) ;
37
- }
38
- deactivate ( ) : void {
35
+ public deactivate ( ) : void {
39
36
// remove bottom status bar icon
40
37
if ( this . statusBarTile ) {
41
38
this . statusBarTile . destroy ( ) ;
@@ -46,5 +43,8 @@ class Main {
46
43
// unmount React
47
44
sideElement . unmount ( ) ;
48
45
}
46
+ private consumeStatusBar ( statusBar ) {
47
+ this . statusBarTile = addToStatusBar ( store , statusBar ) ;
48
+ }
49
49
} ;
50
50
export = new Main ( ) ;
0 commit comments