return err == nil
}, nil)
settingsForm.AddInputField("Tracker", ui.HLClient.pref.Tracker, 0, nil, nil)
+ settingsForm.AddCheckbox("Enable Terminal Bell", ui.HLClient.pref.EnableBell, nil)
settingsForm.AddButton("Save", func() {
usernameInput := settingsForm.GetFormItem(0).(*tview.InputField).GetText()
if len(usernameInput) == 0 {
iconStr = settingsForm.GetFormItem(1).(*tview.InputField).GetText()
ui.HLClient.pref.IconID, _ = strconv.Atoi(iconStr)
ui.HLClient.pref.Tracker = settingsForm.GetFormItem(2).(*tview.InputField).GetText()
+ ui.HLClient.pref.EnableBell = settingsForm.GetFormItem(3).(*tview.Checkbox).IsChecked()
out, err := yaml.Marshal(&ui.HLClient.pref)
if err != nil {
buf := make([]byte, len(scanner.Bytes()))
copy(buf, scanner.Bytes())
- t, _, err := ReadTransaction(buf)
+ var t Transaction
+ _, err := t.Write(buf)
if err != nil {
break
}
- if err := ui.HLClient.HandleTransaction(t); err != nil {
+ if err := ui.HLClient.HandleTransaction(&t); err != nil {
ui.HLClient.Logger.Errorw("Error handling transaction", "err", err)
}
}