diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-03-15 00:14:39 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-03-15 00:14:39 +0200 |
commit | deb2c1ac16ffc79636b1269ebaa05f08ea4a8213 (patch) | |
tree | 409d89e4f96a744b30b4283d16f68d569f527821 /gomuks.go | |
parent | 08f5db1a74cb596a3ddd3de8912dfd858899447e (diff) |
More code
Diffstat (limited to 'gomuks.go')
-rw-r--r-- | gomuks.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -31,6 +31,9 @@ type Gomuks interface { App() *tview.Application UI() *GomuksUI Config() *Config + + Start() + Stop() } type gomuks struct { @@ -68,6 +71,14 @@ func NewGomuks(debug bool) *gomuks { return gmx } +func (gmx *gomuks) Stop() { + gmx.matrix.Stop() + gmx.app.Stop() + if gmx.config.Session != nil { + gmx.config.Session.Save() + } +} + func (gmx *gomuks) Start() { if err := gmx.app.Run(); err != nil { panic(err) |