fix: Resolve call selection index mismatch by using sorted flows everywhere
This commit is contained in:
@@ -960,7 +960,7 @@ func (m Model) renderAddNodeForm() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m Model) renderCallDetail() string {
|
func (m Model) renderCallDetail() string {
|
||||||
flows := m.callFlowStore.GetRecentFlows(20)
|
flows := m.callFlowStore.GetSortedFlows()
|
||||||
if m.selectedFlow >= len(flows) || len(flows) == 0 {
|
if m.selectedFlow >= len(flows) || len(flows) == 0 {
|
||||||
return m.styles.Box.Render("No call selected\n\nPress Esc to go back")
|
return m.styles.Box.Render("No call selected\n\nPress Esc to go back")
|
||||||
}
|
}
|
||||||
@@ -1359,7 +1359,7 @@ func (m Model) styleForNode(node *config.NetworkNode) lipgloss.Style {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Model) updateCallDetailView() {
|
func (m *Model) updateCallDetailView() {
|
||||||
flows := m.callFlowStore.GetRecentFlows(20)
|
flows := m.callFlowStore.GetSortedFlows()
|
||||||
if m.selectedFlow >= len(flows) || len(flows) == 0 {
|
if m.selectedFlow >= len(flows) || len(flows) == 0 {
|
||||||
m.detailsViewport.SetContent("No call selected")
|
m.detailsViewport.SetContent("No call selected")
|
||||||
m.viewport.SetContent("")
|
m.viewport.SetContent("")
|
||||||
|
|||||||
Reference in New Issue
Block a user