~zethra/poki-launcher

4e63bf26f2e9b185409a2b808807f013fe14d9cb — Ben Aaron Goldberg 3 days ago 2465f9c
ui: error pop up not shown for scan errors if results were returned
1 files changed, 4 insertions(+), 1 deletions(-)

M poki-launcher/src/ui.rs
M poki-launcher/src/ui.rs => poki-launcher/src/ui.rs +4 -1
@@ 298,15 298,18 @@ impl PokiLauncher {
            let (app_list, mut errors) =
                scan_desktop_entries(&apps.config.app_paths);
            log_errs(&errors);
            let empty = app_list.is_empty();
            apps.merge_new_entries(app_list);
            if let Err(e) = apps.save(&*DB_PATH) {
                done(Some(e));
            } else {
            } else if empty {
                if let Some(e) = errors.pop() {
                    done(Some(e));
                } else {
                    done(None);
                }
            } else {
                done(None);
            }
            trace!("Scanning...done");
        });