Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the gui package purely for the sake of better encapsulation
This commit is contained in:
@@ -235,13 +235,8 @@ func (u *Updater) getBinaryUrl(newVersion string) string {
|
||||
}
|
||||
|
||||
// Update downloads the latest binary and replaces the current binary with it
|
||||
func (u *Updater) Update(newVersion string, onFinish func(error) error) {
|
||||
go utils.Safe(func() {
|
||||
err := u.update(newVersion)
|
||||
if err = onFinish(err); err != nil {
|
||||
u.Log.Error(err)
|
||||
}
|
||||
})
|
||||
func (u *Updater) Update(newVersion string) error {
|
||||
return u.update(newVersion)
|
||||
}
|
||||
|
||||
func (u *Updater) update(newVersion string) error {
|
||||
|
||||
Reference in New Issue
Block a user