diff --git a/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java b/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java index 15a8ab6a..1620fd10 100644 --- a/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java +++ b/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java @@ -58,6 +58,13 @@ public class ToolsInstallerPreference extends Preference { return R.string.tools_installer_title; } + @Override + protected void onAttachedToActivity() { + super.onAttachedToActivity(); + asyncWorker.supplyAsync(toolsInstaller::areInstalled) + .thenAccept(installed -> setState(installed ? State.ALREADY : State.INITIAL)); + } + @Override protected void onClick() { setState(State.WORKING);