refactor: move and add functions
This commit is contained in:
committed by
Henrik Friedrichsen
parent
04cbe8ac20
commit
c36d3cf272
@@ -42,7 +42,7 @@ pub struct Library {
|
||||
}
|
||||
|
||||
impl Library {
|
||||
pub fn new(ev: &EventManager, spotify: Spotify, cfg: Arc<Config>) -> Self {
|
||||
pub fn new(ev: EventManager, spotify: Spotify, cfg: Arc<Config>) -> Self {
|
||||
let current_user = spotify.api.current_user();
|
||||
let user_id = current_user.as_ref().map(|u| u.id.id().to_string());
|
||||
let display_name = current_user.as_ref().and_then(|u| u.display_name.clone());
|
||||
@@ -56,7 +56,7 @@ impl Library {
|
||||
is_done: Arc::new(RwLock::new(false)),
|
||||
user_id,
|
||||
display_name,
|
||||
ev: ev.clone(),
|
||||
ev,
|
||||
spotify,
|
||||
cfg,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user