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,8 +67,10 @@ 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":
subscriptions.subscriptions.Write() if len(subscriptions.list.Items()) > 0 {
ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name) subscriptions.subscriptions.Write()
ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name)
}
} }
processed = true processed = true
} }