fix(launcher): Exclude GNOME Initial Setup

This commit is contained in:
Michael Aaron Murphy 2021-10-18 16:40:57 +02:00 committed by Michael Murphy
parent 589dcb1cb3
commit 51dafc45e2

View file

@ -59,6 +59,9 @@ pub async fn main() {
}
}
/// Desktop entries to hard exclude.
const EXCLUSIONS: &[&str] = &["GNOME Shell", "Initial Setup"];
struct App<W> {
entries: Vec<Item>,
locale: Option<String>,
@ -126,7 +129,10 @@ impl<W: AsyncWrite + Unpin> App<W> {
}
// Avoid showing the GNOME Shell entry entirely
if entry.name(None).map_or(false, |v| v == "GNOME Shell") {
if entry
.name(None)
.map_or(false, |v| EXCLUSIONS.contains(&v.as_ref()))
{
continue;
}