From 1983a736f3c7ed43a556549153bd08235b405d65 Mon Sep 17 00:00:00 2001 From: Luna D Date: Fri, 13 Mar 2020 10:17:43 +0100 Subject: [PATCH] reverse badge sorting order --- lib/philomena_web/views/profile_view.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/views/profile_view.ex b/lib/philomena_web/views/profile_view.ex index c45a1210..42a39620 100644 --- a/lib/philomena_web/views/profile_view.ex +++ b/lib/philomena_web/views/profile_view.ex @@ -2,7 +2,7 @@ defmodule PhilomenaWeb.ProfileView do use PhilomenaWeb, :view def award_order(awards) do - Enum.sort_by(awards, &{!&1.badge.priority, DateTime.to_unix(&1.awarded_on)}) + Enum.sort_by(awards, &{&1.badge.priority, DateTime.to_unix(&1.awarded_on)}, &>=/2) end def badge_image(badge, options \\ []) do