diff --git a/app/subscriptions.go b/app/subscriptions.go index 38b597b..90006e2 100644 --- a/app/subscriptions.go +++ b/app/subscriptions.go @@ -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)) } case "Enter", "l", "Right": - subscriptions.subscriptions.Write() - ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name) + if len(subscriptions.list.Items()) > 0 { + subscriptions.subscriptions.Write() + ui.ViewChange <- NewUserPage(subscriptions.neighbors[subscriptions.list.Index()].Name) + } } processed = true }