From 40aae36d943e30ca0975a215cdda999a3869e221 Mon Sep 17 00:00:00 2001 From: Lars Kumbier Date: Mon, 17 May 2021 14:42:16 +0200 Subject: [PATCH] Show pipewire warning dialogue instead of status --- ui.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui.go b/ui.go index 192c791..b61c211 100644 --- a/ui.go +++ b/ui.go @@ -34,6 +34,7 @@ type ntcontext struct { capsMismatch bool views *ViewStack isPipewire bool + pipewireWarningShown bool } var green = color.RGBA{34, 187, 69, 255} @@ -79,8 +80,6 @@ func mainView(ctx *ntcontext, w *nucular.Window) { if ctx.noiseSupressorState == loaded { w.LabelColored("NoiseTorch active", "RC", green) - } else if ctx.isPipewire { // intermediate warning - remove when resolved: https://github.com/lawl/NoiseTorch/issues/63 - w.LabelColored("Unfortunately, Pipewire is not supported yet :/", "RC", red) } else if ctx.noiseSupressorState == unloaded { w.LabelColored("NoiseTorch inactive", "RC", red) } else if ctx.noiseSupressorState == inconsistent { @@ -282,6 +281,10 @@ func mainView(ctx *ntcontext, w *nucular.Window) { w.Spacing(1) } + if ctx.isPipewire && !ctx.pipewireWarningShown { + ctx.views.Push(makeErrorView(ctx, w, "Pipewire detected - unfortunately, this is not supported yet. :/")) + ctx.pipewireWarningShown = true + } } func ensureOnlyOneInputSelected(inps *[]device, current *device) {