Refactored some variable assignments
This commit is contained in:
parent
46883cc42d
commit
ebf5f5f970
@ -63,9 +63,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
m.trackPlayer.play(t.getReader())
|
m.trackPlayer.play(t.getReader())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var cmd tea.Cmd
|
||||||
tpv, cmd := m.trackPlayerView.Update(msg)
|
m.trackPlayerView, cmd = m.trackPlayerView.Update(msg)
|
||||||
m.trackPlayerView = tpv
|
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
|
|
||||||
return m, tea.Batch(cmds...)
|
return m, tea.Batch(cmds...)
|
||||||
|
@ -41,12 +41,11 @@ func (v trackPlayerView) Update(msg tea.Msg) (trackPlayerView, tea.Cmd) {
|
|||||||
v.trackList.SetWidth(msg.Width)
|
v.trackList.SetWidth(msg.Width)
|
||||||
}
|
}
|
||||||
|
|
||||||
tl, cmd := v.trackList.Update(msg)
|
var cmd tea.Cmd
|
||||||
v.trackList = tl
|
v.trackList, cmd = v.trackList.Update(msg)
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
|
|
||||||
sb, cmd := v.statusBar.Update(msg)
|
v.statusBar, cmd = v.statusBar.Update(msg)
|
||||||
v.statusBar = sb
|
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
|
|
||||||
return v, tea.Batch(cmds...)
|
return v, tea.Batch(cmds...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user