Do not allow the user to tap the start sharing button twice quickly

This commit is contained in:
Sebastian Kürten
2021-06-28 16:50:55 +02:00
parent b15d42b0cd
commit d46cfb757e

View File

@@ -84,8 +84,10 @@ public class HotspotIntroFragment extends Fragment {
progressBar = v.findViewById(R.id.progressBar);
progressTextView = v.findViewById(R.id.progressTextView);
startButton.setOnClickListener(
button -> conditionManager.startConditionChecks());
startButton.setOnClickListener(button -> {
startButton.setEnabled(false);
conditionManager.startConditionChecks();
});
return v;
}
@@ -97,6 +99,7 @@ public class HotspotIntroFragment extends Fragment {
}
private void startHotspot() {
startButton.setEnabled(true);
if (conditionManager.checkAndRequestConditions()) {
showInstallWarningIfNeeded();
beginDelayedTransition((ViewGroup) requireView());