This commit is contained in:
abs3nt 2023-01-10 14:04:00 -08:00
parent 7d45a3dd4c
commit 25e19cfe4f
5 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ func (m deviceModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
if msg.String() == "ctrl+c" {
os.Exit(0)
return m, tea.Quit
}
if msg.String() == "enter" {
device := m.list.SelectedItem()

View File

@ -78,7 +78,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}
if msg.String() == "ctrl+c" {
os.Exit(0)
return m, tea.Quit
}
if msg.String() == "ctrl+r" {
track := m.list.SelectedItem()

View File

@ -58,7 +58,7 @@ func (m mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
if msg.String() == "ctrl+c" || msg.String() == "q" || msg.String() == "esc" {
os.Exit(0)
return m, tea.Quit
}
if msg.String() == "enter" {
switch m.list.SelectedItem().(mainItem).SpotifyItem.(type) {

View File

@ -63,7 +63,7 @@ func (m playlistModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
if msg.String() == "ctrl+c" {
os.Exit(0)
return m, tea.Quit
}
if msg.String() == "enter" {
playlist := m.list.SelectedItem().(playlistItem).SimplePlaylist

View File

@ -77,7 +77,7 @@ func (m playlistTracksModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}
if msg.String() == "ctrl+c" {
os.Exit(0)
return m, tea.Quit
}
if msg.String() == "ctrl+r" {
track := m.list.SelectedItem()