diff options
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) |