(idx int)
| 167 | } |
| 168 | |
| 169 | func (m configTabModel) toggleBool(idx int) tea.Cmd { |
| 170 | return func() tea.Msg { |
| 171 | f := m.fields[idx] |
| 172 | current := f.value == "true" |
| 173 | newValue := !current |
| 174 | errPutBool := m.client.PutBoolField(f.apiPath, newValue) |
| 175 | return configUpdateMsg{ |
| 176 | path: f.apiPath, |
| 177 | value: newValue, |
| 178 | err: errPutBool, |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | func (m configTabModel) submitEdit(idx int, newValue string) tea.Cmd { |
| 184 | return func() tea.Msg { |
no test coverage detected