From a1f9ee23fa07bdeb548953cdadb7e2cfb0fa05de Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 16 May 2018 21:58:04 +0300 Subject: [PATCH] Load config before initializing UI Otherwise the user ID/homeserver values are ignored even though they're supposed to be prefilled in the UI. Thanks to @jevolk for noticing the mistake. --- gomuks.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gomuks.go b/gomuks.go index 6582ee3..ae007e0 100644 --- a/gomuks.go +++ b/gomuks.go @@ -49,11 +49,12 @@ func NewGomuks(uiProvider ifc.UIProvider) *Gomuks { gmx.config = config.NewConfig(configDir, cacheDir) gmx.ui = uiProvider(gmx) gmx.matrix = matrix.NewContainer(gmx) + + gmx.config.Load() gmx.ui.Init() debug.OnRecover = gmx.ui.Finish - gmx.config.Load() if len(gmx.config.UserID) > 0 { _ = gmx.config.LoadSession(gmx.config.UserID) }