@@ -24,12 +24,12 @@ import q from 'q';
2424const electron = require ( 'electron' ) ;
2525const remote = electron . remote ;
2626
27- electron . remote . autoUpdater . on ( 'update-downloaded' , onUpdateDownloaded ) ;
27+ remote . autoUpdater . on ( 'update-downloaded' , onUpdateDownloaded ) ;
2828
2929function onUpdateDownloaded ( ev , releaseNotes , ver , date , updateURL ) {
3030 dis . dispatch ( {
3131 action : 'new_version' ,
32- currentVersion : electron . remote . app . getVersion ( ) ,
32+ currentVersion : remote . app . getVersion ( ) ,
3333 newVersion : ver ,
3434 releaseNotes : releaseNotes ,
3535 } ) ;
@@ -68,7 +68,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
6868 try {
6969 remote . app . setBadgeCount ( count ) ;
7070 } catch ( e ) {
71- console . error ( " Failed to set notification count" , e ) ;
71+ console . error ( ' Failed to set notification count' , e ) ;
7272 }
7373 }
7474
@@ -89,7 +89,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
8989 // we only have to strip out < and > as the spec doesn't include anything about things like &
9090 // so we shouldn't assume that all implementations will treat those properly. Very basic tag parsing is done.
9191 if ( window . process . platform === 'linux' ) {
92- msg = msg . replace ( / < / g, " <" ) . replace ( / > / g, " >" ) ;
92+ msg = msg . replace ( / < / g, ' <' ) . replace ( / > / g, ' >' ) ;
9393 }
9494
9595 // Notifications in Electron use the HTML5 notification API
@@ -98,7 +98,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
9898 {
9999 body : msg ,
100100 icon : avatarUrl ,
101- tag : " vector" ,
101+ tag : ' vector' ,
102102 silent : true , // we play our own sounds
103103 }
104104 ) ;
@@ -109,7 +109,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
109109 room_id : room . roomId ,
110110 } ) ;
111111 global . focus ( ) ;
112- const win = electron . remote . getCurrentWindow ( ) ;
112+ const win = remote . getCurrentWindow ( ) ;
113113
114114 if ( win . isMinimized ( ) ) win . restore ( ) ;
115115 else if ( ! win . isVisible ( ) ) win . show ( ) ;
@@ -124,7 +124,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
124124 }
125125
126126 getAppVersion ( ) {
127- return q ( electron . remote . app . getVersion ( ) ) ;
127+ return q ( remote . app . getVersion ( ) ) ;
128128 }
129129
130130 pollForUpdate ( ) {
@@ -141,7 +141,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
141141 }
142142
143143 getDefaultDeviceDisplayName ( ) {
144- return " Riot Desktop on " + platformFriendlyName ( ) ;
144+ return ' Riot Desktop on ' + platformFriendlyName ( ) ;
145145 }
146146
147147 screenCaptureErrorString ( ) {
@@ -153,6 +153,6 @@ export default class ElectronPlatform extends VectorBasePlatform {
153153 }
154154
155155 reload ( ) {
156- electron . remote . getCurrentWebContents ( ) . reload ( ) ;
156+ remote . getCurrentWebContents ( ) . reload ( ) ;
157157 }
158158}
0 commit comments