mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(tracker): save recovery in GUI thread and reduce recovery size&frequency
This commit is contained in:
parent
905637eee3
commit
048de55f00
@ -158,7 +158,7 @@ func (t *Tracker) Main() {
|
||||
app.Size(unit.Dp(800), unit.Dp(600)),
|
||||
app.Title("Sointu Tracker"),
|
||||
)
|
||||
recoveryTicker := time.NewTicker(time.Second * 10)
|
||||
recoveryTicker := time.NewTicker(time.Second * 30)
|
||||
t.Explorer = explorer.NewExplorer(w)
|
||||
var ops op.Ops
|
||||
mainloop:
|
||||
@ -212,7 +212,7 @@ mainloop:
|
||||
e.Frame(gtx.Ops)
|
||||
}
|
||||
case <-recoveryTicker.C:
|
||||
go t.SaveRecovery()
|
||||
t.SaveRecovery()
|
||||
}
|
||||
}
|
||||
w.Perform(system.ActionClose)
|
||||
|
@ -111,7 +111,7 @@ const (
|
||||
IDParameter
|
||||
)
|
||||
|
||||
const maxUndo = 256
|
||||
const maxUndo = 64
|
||||
const RECOVERY_FILE = ".sointu_recovery.yml"
|
||||
|
||||
func NewModel(modelMessages chan<- interface{}, playerMessages <-chan PlayerMessage) *Model {
|
||||
|
Loading…
Reference in New Issue
Block a user