diff --git a/lib/polar_web/live/root_live.ex b/lib/polar_web/live/root_live.ex index ee5dc9e..e5ed90a 100644 --- a/lib/polar_web/live/root_live.ex +++ b/lib/polar_web/live/root_live.ex @@ -169,8 +169,9 @@ defmodule PolarWeb.RootLive do join: p in assoc(v, :product), where: v.current_state == ^"active" and p.os == ^os, preload: [{:product, p}], - order_by: [asc: [p.os]], - order_by: [desc: [p.release]] + order_by: [asc: p.os], + order_by: [desc: p.release], + order_by: [desc: v.inserted_at] ) |> Repo.all() @@ -191,8 +192,9 @@ defmodule PolarWeb.RootLive do where: v.current_state == ^"active", join: p in assoc(v, :product), preload: [{:product, p}], - order_by: [asc: [p.os]], - order_by: [desc: [p.release]] + order_by: [asc: p.os], + order_by: [desc: p.release], + order_by: [desc: v.inserted_at] ) |> Repo.all()