File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ function createWindow(url?: string): void {
3636 if ( is . dev && process . env [ 'ELECTRON_RENDERER_URL' ] ) {
3737 window . loadURL ( `${ process . env [ 'ELECTRON_RENDERER_URL' ] } ?view=${ view } &path=${ path } ` )
3838 } else {
39- const query : Record < string , string > = { view : view , path : path ?? '' }
39+ const query : Record < string , string > = { view : view , path : path }
4040 window . loadFile ( join ( __dirname , '../renderer/index.html' ) , { query : query } )
4141 }
4242
@@ -118,7 +118,8 @@ if (!gotTheLock) {
118118 } )
119119
120120 app . whenReady ( ) . then ( ( ) => {
121- createWindow ( )
121+ const url = process . argv . find ( ( arg ) => arg . startsWith ( 'rt://' ) )
122+ createWindow ( url )
122123 } )
123124
124125 app . on ( 'window-all-closed' , ( ) => {
Original file line number Diff line number Diff line change 4040 const view = url .searchParams .get (' view' ) as View
4141 const path = url .searchParams .get (' path' ) ?? ' '
4242
43+ if (path ) {
44+ changeView (view , true , path )
45+ return
46+ }
47+
4348 const lastView = localStorage .getItem (' lastView' ) as View
4449
45- if (lastView !== view && ! path ) {
50+ if (lastView !== view ) {
4651 changeView (lastView )
47- return
4852 }
49-
50- changeView (view , true , path )
5153 })
5254 </script >
5355
Original file line number Diff line number Diff line change 6262 subscribed = false
6363 } else {
6464 const deleted = await window .user .add (Platform .Twitch , username )
65- notify (` Subscribed to ${deleted } ` )
65+ notify (` Subscribed to ${deleted . username } ` )
6666 subscribed = true
6767 }
6868 } catch (err ) {
You can’t perform that action at this time.
0 commit comments