MCPcopy
hub / github.com/SurgeDM/Surge / GetSelectedDownload

Method GetSelectedDownload

internal/tui/list.go:308–315  ·  view source on GitHub ↗

GetSelectedDownload returns the currently selected download from the list

()

Source from the content-addressed store, hash-verified

306
307// GetSelectedDownload returns the currently selected download from the list
308func (m *RootModel) GetSelectedDownload() *DownloadModel {
309 if item := m.list.SelectedItem(); item != nil {
310 if di, ok := item.(DownloadItem); ok {
311 return di.download
312 }
313 }
314 return nil
315}

Calls

no outgoing calls