diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-05-17 16:29:15 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-05-17 16:29:18 +0300 |
commit | 76cff9554001ca3727e2ba11b790e9bba27d6b77 (patch) | |
tree | 325015fa4b331aeb4487d2ed0aaf94f2f3d40fe4 /gomuks.go | |
parent | a1f9ee23fa07bdeb548953cdadb7e2cfb0fa05de (diff) |
Move all cache to ~/.cache/gomuks
Now `rm -rf ~/.cache/gomuks` has the same effect as `/clearcache`
Diffstat (limited to 'gomuks.go')
-rw-r--r-- | gomuks.go | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -50,24 +50,17 @@ func NewGomuks(uiProvider ifc.UIProvider) *Gomuks { gmx.ui = uiProvider(gmx) gmx.matrix = matrix.NewContainer(gmx) - gmx.config.Load() + gmx.config.LoadAll() gmx.ui.Init() debug.OnRecover = gmx.ui.Finish - if len(gmx.config.UserID) > 0 { - _ = gmx.config.LoadSession(gmx.config.UserID) - } - return gmx } // Save saves the active session and message history. func (gmx *Gomuks) Save() { - if gmx.config.Session != nil { - debug.Print("Saving session...") - _ = gmx.config.Session.Save() - } + gmx.config.SaveAll() debug.Print("Saving history...") gmx.ui.MainView().SaveAllHistory() } |