Skip to content

Commit

Permalink
Pass app to cloud setup
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 16, 2021
1 parent f9f068c commit ca0cb4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func (a *fyneApp) SetCloudProvider(p fyne.CloudProvider) {
}

func (a *fyneApp) transitionCloud(p fyne.CloudProvider) {
err := p.Setup()
err := p.Setup(a)
if err != nil {
fyne.LogError("Failed to set up cloud provider "+ p.ProviderName(), err)
fyne.LogError("Failed to set up cloud provider "+p.ProviderName(), err)
return
}
a.cloud = p
Expand Down
2 changes: 1 addition & 1 deletion cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type CloudProvider interface {
ProviderName() string
// Setup is called when this provider is being used for the first time.
// Returning an error will exit the cloud setup process, though it can be retried.
Setup() error
Setup(App) error
}

// CloudProviderPreferences interface defines the functionality that a cloud provider will include if it is capable
Expand Down

0 comments on commit ca0cb4a

Please sign in to comment.