File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11> Get the latest release: https://github.com/avwo/whistle-client/releases
2+ # v1.6.5
3+ 1 . fix: https://github.com/avwo/whistle-client/issues/126
4+ 2 . feat: update whistle to v2.10.4
25
36# v1.6.4
471 . fix: https://github.com/avwo/whistle-client/issues/124
Original file line number Diff line number Diff line change @@ -156,12 +156,14 @@ const updateTitle = (force) => {
156156 curTitle = title ;
157157 title = `${ title } ${ getEnabledRules ( ) } ` ;
158158 const win = getWin ( ) ;
159- if ( win ) {
160- win . setTitle ( title ) ;
161- }
162- if ( tray ) {
163- tray . setToolTip ( title ) ;
164- }
159+ try {
160+ if ( win ) {
161+ win . setTitle ( title ) ;
162+ }
163+ if ( tray ) {
164+ tray . setToolTip ( title ) ;
165+ }
166+ } catch ( e ) { }
165167} ;
166168
167169const setStartAtLogin = ( startAtLogin ) => {
@@ -467,12 +469,6 @@ exports.create = async () => {
467469 updateHideFromDock ( ) ;
468470
469471 let autoSet = storage . getProperty ( 'autoSetProxy' ) ;
470- if ( autoSet ) {
471- await enableSystemProxy ( ) ;
472- } else {
473- setEnabled ( false ) ;
474- }
475- updateTitle ( ) ;
476472 const detectProxy = ( ) => {
477473 if ( isSettingProxy || ! isEnabled ( ) ) {
478474 autoSet = false ;
@@ -503,7 +499,16 @@ exports.create = async () => {
503499 setTimeout ( detectProxy , INTERVAL ) ;
504500 } ) ;
505501 } ;
506- setTimeout ( detectProxy , autoSet ? 200 : INTERVAL ) ;
502+ if ( autoSet ) {
503+ setTimeout ( async ( ) => {
504+ await enableSystemProxy ( ) ;
505+ setTimeout ( detectProxy , 200 ) ;
506+ } , 1000 ) ;
507+ } else {
508+ setEnabled ( false ) ;
509+ setTimeout ( detectProxy , INTERVAL ) ;
510+ }
511+ updateTitle ( ) ;
507512 nativeTheme . on ( 'updated' , ( ) => {
508513 const curTheme = getTheme ( ) ;
509514 if ( theme === curTheme ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " Whistle" ,
3- "version" : " 1.6.4 " ,
3+ "version" : " 1.6.5 " ,
44 "description" : " Whistle Web Debugging Proxy" ,
55 "main" : " ./lib/index.js" ,
66 "author" : " avenwu <avwu@qq.com>" ,
9292 "find-bar" : " ^0.1.3" ,
9393 "fs-extra" : " ^11.1.1" ,
9494 "npminstall" : " ^7.9.0" ,
95- "whistle" : " ^2.10.3 " ,
95+ "whistle" : " ^2.10.4 " ,
9696 "whistle.proxyauth" : " ^1.2.0"
9797 }
9898}
You can’t perform that action at this time.
0 commit comments