add HookExitCb for OnExitCb

This commit is contained in:
cuu
2023-01-16 12:55:12 +00:00
parent ef19017718
commit 0e62938403
13 changed files with 265 additions and 125 deletions

View File

@@ -398,14 +398,17 @@ func (self *WareHouse) Init() {
self.rpcSecret,
gotime.Second, AppNotifier{Parent:self})
if err != nil {
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
}
}
self.rpcc = rpcc
self.Downloader = grab.NewClient()
self.Downloading = make(chan bool,1)
self.Screen.HookExitCb(self)
}
}
@@ -768,7 +771,6 @@ func (self *WareHouse) OnKbdReturnBackCb() {
}
func (self *WareHouse) OnExitCb() {
self.SetDownloading(false)
self.rpcc.Close()