From 5384d9ee4be383bd6b51ab6921f104a553c2045d Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Mon, 13 Mar 2023 11:40:40 -0400 Subject: [PATCH] Reset --- lib/live_beats_web/live/profile_live.ex | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/live_beats_web/live/profile_live.ex b/lib/live_beats_web/live/profile_live.ex index c68434d..cda5f83 100644 --- a/lib/live_beats_web/live/profile_live.ex +++ b/lib/live_beats_web/live/profile_live.ex @@ -60,13 +60,6 @@ defmodule LiveBeatsWeb.ProfileLive do total_count={@presences_count} /> -
-
- [<%= MP3Stat.to_mmss(trunc(segment.start_time)) %>] - <%= segment.text %> -
-
-
<%= for {_id, song} <- if(@owns_profile?, do: @streams.songs, else: []), id = "delete-modal-#{song.id}" do %> <.modal @@ -158,7 +151,6 @@ defmodule LiveBeatsWeb.ProfileLive do end active_song = MediaLibrary.get_current_active_song(profile) - speech_segments = if active_song, do: active_song.speech_segments, else: [] songs = MediaLibrary.list_profile_songs(profile, 50) @@ -169,10 +161,9 @@ defmodule LiveBeatsWeb.ProfileLive do active_profile_id: current_user.active_profile_user_id, profile: profile, owns_profile?: MediaLibrary.owns_profile?(current_user, profile), - songs_count: Enum.count(songs), + songs_count: Enum.count(songs) ) |> stream(:songs, songs) - |> stream(:speech_segments, speech_segments, dom_id: &"ss-#{trunc(&1.start_time)}") |> assign_presences() {:ok, socket, temporary_assigns: [presences: %{}]} @@ -328,9 +319,6 @@ defmodule LiveBeatsWeb.ProfileLive do stream_insert(socket, :songs, song) active_song_id -> - Enum.reduce(song.speech_segments, socket, fn seg, acc -> - stream_insert(acc, :speech_segments, seg) - end) |> stop_song(active_song_id) |> stream_insert(:songs, song) |> assign(active_song_id: song.id)