mirror of
https://github.com/whyorean/AuroraStore.git
synced 2026-06-19 21:19:16 -04:00
Install button is now disabled until installation finishes if auto install preference is on
This commit is contained in:
@@ -39,11 +39,19 @@ public class DetailsDownloadReceiver extends BroadcastReceiver {
|
||||
if (!state.isEverythingFinished()) {
|
||||
return;
|
||||
}
|
||||
draw(context, state);
|
||||
}
|
||||
|
||||
private void draw(Context context, DownloadState state) {
|
||||
buttonDownload.setText(R.string.details_download);
|
||||
buttonDownload.setEnabled(true);
|
||||
if (state.isEverythingSuccessful()) {
|
||||
buttonDownload.setVisibility(View.GONE);
|
||||
buttonInstall.setVisibility(View.VISIBLE);
|
||||
if (PreferenceActivity.getBoolean(context, PreferenceActivity.PREFERENCE_AUTO_INSTALL)) {
|
||||
buttonInstall.setEnabled(false);
|
||||
buttonInstall.setText(R.string.details_installing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user