removeDownloadByID removes a download from the in-memory list. Returns true if a download was removed.
(id string)
| 62 | // removeDownloadByID removes a download from the in-memory list. |
| 63 | // Returns true if a download was removed. |
| 64 | func (m *RootModel) removeDownloadByID(id string) bool { |
| 65 | for i, d := range m.downloads { |
| 66 | if d.ID == id { |
| 67 | m.downloads = append(m.downloads[:i], m.downloads[i+1:]...) |
| 68 | return true |
| 69 | } |
| 70 | } |
| 71 | return false |
| 72 | } |
| 73 | |
| 74 | func (m *RootModel) handleFilePickerSelection(path string) (tea.Model, tea.Cmd) { |
| 75 | switch m.filepickerOrigin { |
no outgoing calls
no test coverage detected