From 9dea4a0270c3d661fa358c291add9eb9572e2620 Mon Sep 17 00:00:00 2001 From: familyfriendlymikey Date: Sat, 27 Aug 2022 20:59:51 -0400 Subject: [PATCH] simplify pin code --- app/client.imba | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/client.imba b/app/client.imba index 2d37e69..8cbbf3e 100644 --- a/app/client.imba +++ b/app/client.imba @@ -121,9 +121,7 @@ tag app if state.query.trim!.length > 0 state.scored_links = fzi state.links, state.query else - let pinned = do |link| link.is_pinned - let frequency = do |link| link.frequency - state.scored_links = orderBy(state.links, [pinned, frequency], ['desc', 'desc']) + state.scored_links = orderBy(state.links, ['is_pinned', 'frequency'], ['desc', 'desc']) def increment_link_frequency link try