aboutsummaryrefslogtreecommitdiff
path: root/src/app.rs
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2024-05-01 12:08:56 +0530
committerkrolxon <krolyxon@tutanota.com>2024-05-01 12:08:56 +0530
commit955532893fc6db5a78f88ef2a2700dec56cd3012 (patch)
tree452e05bd0c8aa959c824ba49655ecc7c37c1b327 /src/app.rs
parentb29846fb72326dc04bc13fe11d07965879787533 (diff)
remove queue struct, and use generics of ContentList
Diffstat (limited to 'src/app.rs')
-rwxr-xr-xsrc/app.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/app.rs b/src/app.rs
index d487e05..f0b51f2 100755
--- a/src/app.rs
+++ b/src/app.rs
@@ -3,7 +3,6 @@ use std::time::Duration;
use crate::browser::FileBrowser;
use crate::connection::Connection;
use crate::list::ContentList;
-use crate::queue::Queue;
use crate::ui::InputMode;
use mpd::{Client, Song};
@@ -16,10 +15,10 @@ pub struct App {
/// check if app is running
pub running: bool,
pub conn: Connection,
- pub browser: FileBrowser, // Directory browser
- pub queue_list: Queue, // Stores the current playing queue
- pub pl_list: ContentList<String>, // Stores list of playlists
- pub selected_tab: SelectedTab, // Used to switch between tabs
+ pub browser: FileBrowser, // Directory browser
+ pub queue_list: ContentList<Song>, // Stores the current playing queue
+ pub pl_list: ContentList<String>, // Stores list of playlists
+ pub selected_tab: SelectedTab, // Used to switch between tabs
// Search
pub inputmode: InputMode, // Defines input mode, Normal or Search
@@ -44,7 +43,7 @@ pub enum SelectedTab {
impl App {
pub fn builder(addrs: &str) -> AppResult<Self> {
let mut conn = Connection::new(addrs).unwrap();
- let mut queue_list = Queue::new();
+ let mut queue_list = ContentList::new();
let mut pl_list = ContentList::new();
pl_list.list = Self::get_playlist(&mut conn.conn)?;