From 64c68d7b615deedf491aebf635511499dd9728ab Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Wed, 10 Nov 2021 16:07:10 -0500 Subject: [PATCH] remove redudant order_by --- assets/js/app.js | 15 +-------------- lib/live_beats/media_library.ex | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 849a104..ffc5ec6 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -94,20 +94,7 @@ Hooks.AudioPlayer = { let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") let liveSocket = new LiveSocket("/live", Socket, { hooks: Hooks, - params: {_csrf_token: csrfToken}, - dom: { - onNodeAdded(node){ - if(node.getAttribute && node.getAttribute("data-fade-in")){ - from.classList.add("fade-in") - } - }, - onBeforeElUpdated(from, to) { - if(from.classList.contains("fade-in")){ - from.classList.remove("fade-in") - from.classList.add("fade-in") - } - } - } + params: {_csrf_token: csrfToken} }) // Show progress bar on live navigation and form submits diff --git a/lib/live_beats/media_library.ex b/lib/live_beats/media_library.ex index aeeec64..dba6c4f 100644 --- a/lib/live_beats/media_library.ex +++ b/lib/live_beats/media_library.ex @@ -208,7 +208,6 @@ defmodule LiveBeats.MediaLibrary do def get_last_song(user_id) do from(s in Song, where: s.user_id == ^user_id, - order_by: [desc: s.inserted_at, desc: s.id], limit: 1 ) |> order_by_playlist(:desc)