ToolsInstallerPreference: Examine current state on load
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
b87568482d
commit
011d683c23
@ -58,6 +58,13 @@ public class ToolsInstallerPreference extends Preference {
|
|||||||
return R.string.tools_installer_title;
|
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
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
setState(State.WORKING);
|
setState(State.WORKING);
|
||||||
|
Loading…
Reference in New Issue
Block a user