1
use futures::future;
2

            
3
use crate::{utils::commands::protontricks::Protontricks, API};
4

            
5
pub async fn command() -> Result<(), String> {
6
    println!("Fetching installed apps...");
7

            
8
    let (installed_app_ids, apps) = future::join(Protontricks::apps(), API.apps()).await;
9

            
10
    let apps = apps
11
        .iter()
12
        .filter(|app| installed_app_ids.contains(&app.id));
13

            
14
    for app in apps {
15
        println!("{0} ({1})", app.name, app.id);
16
    }
17

            
18
    Ok(())
19
}