From 646b85aade310fc208af1ddae30abcc14d2f226c Mon Sep 17 00:00:00 2001 From: Kayden Tebau Date: Sat, 12 Nov 2022 16:34:04 -0800 Subject: [PATCH] Fix announcement sorting --- lib/unix_dog/Controller/Main.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unix_dog/Controller/Main.pm b/lib/unix_dog/Controller/Main.pm index 7639f9d..b227a72 100644 --- a/lib/unix_dog/Controller/Main.pm +++ b/lib/unix_dog/Controller/Main.pm @@ -104,7 +104,7 @@ sub announcements ($self) { $next_page = $page + 1; } - my @chosen = (sort keys %announcements)[$start_index..$end_index]; + my @chosen = (sort { $b cmp $a } (keys %announcements))[$start_index..$end_index]; my @items; for my $key (@chosen) { push @items, $announcements{$key};