@@ -32,7 +32,12 @@ type DockShortcut = {
32
32
}
33
33
}
34
34
35
- class FooterViewCtrl extends PureViewCtrl {
35
+ class FooterViewCtrl extends PureViewCtrl < { } , {
36
+ outOfSync : boolean ;
37
+ hasPasscode : boolean ;
38
+ dataUpgradeAvailable : boolean ;
39
+ dockShortcuts : DockShortcut [ ] ;
40
+ } > {
36
41
37
42
private $rootScope : ng . IRootScopeService
38
43
private rooms : SNComponent [ ] = [ ]
@@ -96,7 +101,10 @@ class FooterViewCtrl extends PureViewCtrl {
96
101
97
102
getInitialState ( ) {
98
103
return {
99
- hasPasscode : false
104
+ outOfSync : false ,
105
+ dataUpgradeAvailable : false ,
106
+ hasPasscode : false ,
107
+ dockShortcuts : [ ] ,
100
108
} ;
101
109
}
102
110
@@ -379,19 +387,19 @@ class FooterViewCtrl extends PureViewCtrl {
379
387
icon : icon
380
388
} as DockShortcut ) ;
381
389
}
382
- this . dockShortcuts = shortcuts . sort ( ( a , b ) => {
383
- /** Circles first, then images */
384
- const aType = a . icon . type ;
385
- const bType = b . icon . type ;
386
- if ( aType === bType ) {
387
- return 0 ;
388
- } else if ( aType === 'circle' && bType === 'svg' ) {
389
- return - 1 ;
390
- } else if ( bType === 'circle' && aType === 'svg' ) {
391
- return 1 ;
392
- } else {
393
- return 0 ;
394
- }
390
+ this . setState ( {
391
+ dockShortcuts : shortcuts . sort ( ( a , b ) => {
392
+ /** Circles first, then images */
393
+ const aType = a . icon . type ;
394
+ const bType = b . icon . type ;
395
+ if ( aType === 'circle' && bType === 'svg' ) {
396
+ return - 1 ;
397
+ } else if ( bType === 'circle' && aType === 'svg' ) {
398
+ return 1 ;
399
+ } else {
400
+ return a . name . localeCompare ( b . name ) ;
401
+ }
402
+ } )
395
403
} ) ;
396
404
}
397
405
0 commit comments