Browse Source

simplify pin code

main
familyfriendlymikey 2 years ago
parent
commit
9dea4a0270
  1. 4
      app/client.imba

4
app/client.imba

@ -121,9 +121,7 @@ tag app
if state.query.trim!.length > 0 if state.query.trim!.length > 0
state.scored_links = fzi state.links, state.query state.scored_links = fzi state.links, state.query
else else
let pinned = do |link| link.is_pinned state.scored_links = orderBy(state.links, ['is_pinned', 'frequency'], ['desc', 'desc'])
let frequency = do |link| link.frequency
state.scored_links = orderBy(state.links, [pinned, frequency], ['desc', 'desc'])
def increment_link_frequency link def increment_link_frequency link
try try

Loading…
Cancel
Save