summaryrefslogtreecommitdiff
path: root/pkg/backend/init.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-08 03:32:46 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-08 20:09:48 +0200
commita0e67fe3feb5b3a2d6d0f8e5f33ff96007955b17 (patch)
treecda0ca1934af399385c21a67fe56b55577c7c2a5 /pkg/backend/init.go
parente591c3147e3c504611ff612e8918018125ffa2eb (diff)
[feat] lookup the config vars at runtime
- Resolves: #326
Diffstat (limited to 'pkg/backend/init.go')
-rw-r--r--pkg/backend/init.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/backend/init.go b/pkg/backend/init.go
index be4427a..aabc720 100644
--- a/pkg/backend/init.go
+++ b/pkg/backend/init.go
@@ -14,13 +14,17 @@ import (
// api uses the sync.Once primitive to call this.
func initializeContext(opts *InitOpts) {
var st status = off
+
+ // TODO - now there's really no need to dance between opts and config anymore
+ // but this was the simplest transition. We should probably keep the multi-provider config in the backend too, and just
+ // switch the "active" here in the ctx, after the user has selected one in the combobox.
ctx = &connectionCtx{
- AppName: opts.AppName,
- Provider: opts.Provider,
+ AppName: opts.ProviderOptions.AppName,
+ Provider: opts.ProviderOptions.Provider,
TosURL: config.TosURL,
HelpURL: config.HelpURL,
DonateURL: config.DonateURL,
- AskForDonations: wantDonations(),
+ AskForDonations: config.AskForDonations,
DonateDialog: false,
Version: version.VERSION,
Status: st,