From 09b62afc91ad9cf8fa49f2a9d1abed00bf1da33d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 20 Feb 2025 06:55:36 -0600 Subject: [PATCH] adding basis for song_editor --- src/ui/mod.rs | 2 +- src/ui/{editor.rs => song_editor.rs} | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) rename src/ui/{editor.rs => song_editor.rs} (85%) diff --git a/src/ui/mod.rs b/src/ui/mod.rs index fa91cb6..5c276fa 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -1,4 +1,4 @@ -pub mod editor; pub mod library; pub mod presenter; +pub mod song_editor; pub mod video; diff --git a/src/ui/editor.rs b/src/ui/song_editor.rs similarity index 85% rename from src/ui/editor.rs rename to src/ui/song_editor.rs index 9b60104..797e3d8 100644 --- a/src/ui/editor.rs +++ b/src/ui/song_editor.rs @@ -4,7 +4,7 @@ use crate::core::songs::Song; #[derive(Debug, Clone)] pub struct SongEditor { - song: Song, + song: Option, } #[derive(Debug, Clone)] @@ -14,6 +14,9 @@ pub enum Message { } impl SongEditor { + pub fn new() -> Self { + Self { song: None } + } pub fn update(&self, message: Message) -> Task { match message { Message::ChangeSong(song) => todo!(),