File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ wrap(() => {
4040 if ( ! data || ! isNewer ( data ) ) return false ;
4141 eventManager . once ( ':update:finished :update:force' , ( ) => {
4242 updateToast ?. close ( 'stale' ) ;
43+ if ( data . announce ) return ;
4344 updateToast = Toast ( {
4445 title : '[UnderScript] Update Available!' ,
4546 text : `Version ${ data . version } .` ,
@@ -67,13 +68,11 @@ wrap(() => {
6768 url : await checker . getDownload ( data ) ,
6869 version : await checker . getVersion ( data ) ,
6970 time : data . assets . find ( ( { name } ) => name . endsWith ( '.user.js' ) ) . updated_at ,
71+ announce : silent . value ( ) ,
72+ plugin,
7073 } ;
7174 if ( compareAndToast ( update ) ) {
72- register ( {
73- ...update ,
74- plugin,
75- announce : false ,
76- } ) ;
75+ register ( update ) ;
7776 }
7877 } catch ( error ) {
7978 debugToast ( error ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export const disabled = settings.register({
3030 category : 'Updates' ,
3131} ) ;
3232
33- const silent = settings . register ( {
33+ export const silent = settings . register ( {
3434 name : 'Run automatic updates in the background' ,
3535 key : 'underscript.updates.silent' ,
3636 category : 'Updates' ,
You can’t perform that action at this time.
0 commit comments