Merge branch '2090-avoid-double-tap-on-start-sharing-button' into '1081-share-app-via-wifi-hotspot'

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

See merge request briar/briar!1495
This commit is contained in:
Torsten Grote
2021-07-05 11:24:47 +00:00

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());