From cb7ecd26af345916266410cf4165bae70b3bd972 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 15 Aug 2024 10:34:58 +0000 Subject: [PATCH] Fix possible browser freeze --- .../io/xpipe/app/browser/action/ApplicationPathAction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/xpipe/app/browser/action/ApplicationPathAction.java b/app/src/main/java/io/xpipe/app/browser/action/ApplicationPathAction.java index be7385715..e836a150d 100644 --- a/app/src/main/java/io/xpipe/app/browser/action/ApplicationPathAction.java +++ b/app/src/main/java/io/xpipe/app/browser/action/ApplicationPathAction.java @@ -9,6 +9,12 @@ public interface ApplicationPathAction extends BrowserAction { String getExecutable(); + @Override + default void init(OpenFileSystemModel model) throws Exception { + // Cache result for later calls + model.getCache().isApplicationInPath(getExecutable()); + } + @Override default boolean isActive(OpenFileSystemModel model, List entries) { return model.getCache().isApplicationInPath(getExecutable());