From 0689fcdf7ccb02d4f9fdeb57ec5c96bbbba05d84 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Fri, 10 May 2024 11:59:39 -0400 Subject: [PATCH] sort inbox --- state.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/state.go b/state.go index 8dd2d27..84f2579 100644 --- a/state.go +++ b/state.go @@ -478,6 +478,9 @@ func (state *State) GetMessages() { }) } } + sort.Slice(state.Activities, func(i, j int) bool { + return state.Activities[i].Timestamp.After(state.Activities[j].Timestamp.Time) + }) } func (state *State) GetUser(username string) {