summaryrefslogtreecommitdiffstats
path: root/pkg/app
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-30 23:24:24 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-04-30 13:19:52 +1000
commit8edad826caf2fa48bfad33f9f8c4f3ba49a052da (patch)
tree0b49145e4f656e72441199b5a5c30176c898d7a7 /pkg/app
parent826128a8e03fb50f7287029ebac93c85712faecb (diff)
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
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/app.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index 23030b37d..5d0359d17 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -33,7 +33,6 @@ type App struct {
Config config.AppConfigurer
OSCommand *oscommands.OSCommand
Gui *gui.Gui
- Updater *updates.Updater // may only need this on the Gui
}
func Run(
@@ -87,8 +86,7 @@ func NewApp(config config.AppConfigurer, common *common.Common) (*App, error) {
app.OSCommand = oscommands.NewOSCommand(common, config, oscommands.GetPlatform(), oscommands.NewNullGuiIO(app.Log))
- var err error
- app.Updater, err = updates.NewUpdater(common, config, app.OSCommand)
+ updater, err := updates.NewUpdater(common, config, app.OSCommand)
if err != nil {
return app, err
}
@@ -108,7 +106,7 @@ func NewApp(config config.AppConfigurer, common *common.Common) (*App, error) {
return app, err
}
- app.Gui, err = gui.NewGui(common, config, gitVersion, app.Updater, showRecentRepos, dirName)
+ app.Gui, err = gui.NewGui(common, config, gitVersion, updater, showRecentRepos, dirName)
if err != nil {
return app, err
}