aboutsummaryrefslogtreecommitdiff
path: root/gomuks.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-05-17 16:29:15 +0300
committerTulir Asokan <tulir@maunium.net>2018-05-17 16:29:18 +0300
commit76cff9554001ca3727e2ba11b790e9bba27d6b77 (patch)
tree325015fa4b331aeb4487d2ed0aaf94f2f3d40fe4 /gomuks.go
parenta1f9ee23fa07bdeb548953cdadb7e2cfb0fa05de (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.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/gomuks.go b/gomuks.go
index ae007e0..b668324 100644
--- a/gomuks.go
+++ b/gomuks.go
@@ -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()
}