File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,6 @@ export default class AutoUpdater {
112
112
clearInterval ( this . timer ) ;
113
113
}
114
114
this . timer = setInterval ( async ( ) => {
115
- if ( this . updateInfo ?. updateVersion ) {
116
- this . timer && clearInterval ( this . timer )
117
- return ;
118
- }
119
115
const info = await this . update ( true )
120
116
if ( typeof info === 'boolean' ) {
121
117
return ;
@@ -128,14 +124,18 @@ export default class AutoUpdater {
128
124
} , CheckInterval )
129
125
}
130
126
async update ( seeIfUpdatedOnly = false , specifyVersion = "" ) {
127
+ const refresh = async ( ) => {
128
+ const resp = await this . updatePlugin ( this . githubPath , seeIfUpdatedOnly , specifyVersion ) ;
129
+ if ( resp && ( typeof resp !== 'boolean' ) ) {
130
+ this . updateInfo = resp ;
131
+ }
132
+ return resp ;
133
+ }
131
134
if ( seeIfUpdatedOnly && this . updateInfo ?. updateVersion ) {
135
+ refresh ( ) ;
132
136
return this . updateInfo ;
133
137
}
134
- const resp = await this . updatePlugin ( this . githubPath , seeIfUpdatedOnly , specifyVersion ) ;
135
- if ( resp && ( typeof resp !== 'boolean' ) ) {
136
- this . updateInfo = resp ;
137
- }
138
- return resp ;
138
+ return refresh ( ) ;
139
139
}
140
140
/**
141
141
* Primary function for adding a new beta plugin to Obsidian.
You can’t perform that action at this time.
0 commit comments