(msg tea.KeyPressMsg)
| 159 | if cmd, ok := v.requests.settle(msg.requestResult); !ok { |
| 160 | return cmd, true |
| 161 | } |
| 162 | v.confirmedHabitDeleteID = 0 |
| 163 | v.events, v.todos, v.habits = splitRecordings(msg.recordings) |
| 164 | v.normalizeHabitSelection() |
| 165 | v.rebuildView() |
| 166 | return nil, true |
| 167 | |
| 168 | case habitMutationMsg: |
| 169 | if !v.requests.accepts(msg.requestResult) { |
| 170 | return nil, true |
| 171 | } |
| 172 | v.requests.finish(msg.requestID) |
| 173 | if msg.err != nil { |
| 174 | if v.habitForm != nil { |
| 175 | v.habitForm.saving = false |
| 176 | v.habitForm.status = errorNotice("Save failed", msg.err) |
| 177 | v.habitForm.isError = true |
| 178 | } else { |
| 179 | v.notice = errorNotice("Delete failed", msg.err) |
| 180 | } |
| 181 | return nil, true |
| 182 | } |
| 183 | v.habitForm = nil |
| 184 | v.confirmedHabitDeleteID = 0 |
| 185 | v.notice = msg.action |
| 186 | if v.calIndex >= 0 && v.calIndex < len(v.calendars) { |
nothing calls this directly
no test coverage detected