File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 11// @flow
22
3- export default class BaseIntegrationManager {
3+ export default class BasePlatform {
44 constructor ( ) {
55 this . notificationCount = 0 ;
66 this . errorDidOccur = false ;
Original file line number Diff line number Diff line change 11// @flow
2- import BaseIntegrationManager from './BaseIntegrationManager ' ;
2+ import BasePlatform from './BasePlatform ' ;
33
44// index.js imports us unconditionally, so we need this check here as well
55let electron = null , remote = null ;
@@ -8,7 +8,7 @@ if (window && window.process && window.process && window.process.type === 'rende
88 remote = electron . remote ;
99}
1010
11- export default class ElectronIntegrationManager extends BaseIntegrationManager {
11+ export default class ElectronPlatform extends BasePlatform {
1212 setNotificationCount ( count : number ) {
1313 super . setNotificationCount ( count ) ;
1414 remote . app . setBadgeCount ( count ) ;
Original file line number Diff line number Diff line change 11// @flow
2- import BaseIntegrationManager from './BaseIntegrationManager ' ;
2+ import BasePlatform from './BasePlatform ' ;
33import Favico from 'favico.js' ;
44
5- export default class WebIntegrationManager extends BaseIntegrationManager {
5+ export default class WebPlatform extends BasePlatform {
66 constructor ( ) {
77 super ( ) ;
88 this . favicon = new Favico ( { animation : 'popFade' } ) ;
Original file line number Diff line number Diff line change 1+ // @flow
2+
3+ import ElectronPlatform from './ElectronPlatform' ;
4+ import WebPlatform from './WebPlatform' ;
5+
6+ let Platform = null ;
7+
8+ if ( window && window . process && window . process && window . process . type === 'renderer' ) {
9+ // we're running inside electron
10+ Platform = ElectronPlatform ;
11+ } else {
12+ Platform = WebPlatform ;
13+ }
14+
15+ export default Platform ;
You can’t perform that action at this time.
0 commit comments