add settings menu item to check for updates immediately

This commit is contained in:
Drew Weymouth
2023-03-30 19:19:01 -07:00
parent d59352cd4d
commit 06cd393b8c
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ func (u *UpdateChecker) LatestReleaseURL() *url.URL {
}
func (u *UpdateChecker) checkForUpdate() {
t := u.latestVersionTag()
t := u.CheckLatestVersionTag()
if t != "" && t != *u.lastCheckedTag {
u.versionTagFound = t
if u.OnUpdatedVersionFound != nil {
@@ -61,7 +61,7 @@ func (u *UpdateChecker) checkForUpdate() {
}
}
func (u *UpdateChecker) latestVersionTag() string {
func (u *UpdateChecker) CheckLatestVersionTag() string {
resp, err := http.Head(u.latestReleaseURL)
if err != nil {
log.Printf("failed to check for newest version: %s", err.Error())