fix panic

trunk
nbsp 2025-01-07 15:41:45 +02:00
parent 1e92e88b5a
commit ce6832dd76
No known key found for this signature in database
GPG Key ID: 7184AC1C9835CE48
1 changed files with 4 additions and 2 deletions

View File

@ -67,9 +67,11 @@ func (subscriptions *Subscriptions) Event(state *ui.State, event vaxis.Event) (p
subscriptions.list.SetItem(subscriptions.list.Index(), formatNeighbor(user, subscriptions.subscriptions)) subscriptions.list.SetItem(subscriptions.list.Index(), formatNeighbor(user, subscriptions.subscriptions))
} }
case "Enter", "l", "Right": case "Enter", "l", "Right":
if len(subscriptions.list.Items()) > 0 {
subscriptions.subscriptions.Write() subscriptions.subscriptions.Write()
ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name) ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name)
} }
}
processed = true processed = true
} }
subscriptions.Draw(state) subscriptions.Draw(state)