mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 23:44:06 +01:00
🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
9531bdd01c
commit
e2a6780cec
14 changed files with 155 additions and 16 deletions
|
|
@ -144,11 +144,11 @@ func LoadUploadToken() (err error) {
|
|||
}
|
||||
|
||||
var (
|
||||
refreshUserTicker = time.NewTicker(2 * time.Hour)
|
||||
refreshCheckTicker = time.NewTicker(2 * time.Hour)
|
||||
subscriptionExpirationReminded bool
|
||||
)
|
||||
|
||||
func AutoRefreshUser() {
|
||||
func AutoRefreshCheck() {
|
||||
for {
|
||||
if !subscriptionExpirationReminded {
|
||||
subscriptionExpirationReminded = true
|
||||
|
|
@ -235,7 +235,12 @@ func AutoRefreshUser() {
|
|||
}
|
||||
}()
|
||||
|
||||
<-refreshUserTicker.C
|
||||
go func() {
|
||||
defer logging.Recover()
|
||||
checkDownloadInstallPkg()
|
||||
}()
|
||||
|
||||
<-refreshCheckTicker.C
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue