mirror of
https://github.com/DrKLO/Telegram.git
synced 2025-03-14 11:44:00 +01:00
multiple_dialogs
This commit is contained in:
parent
3480f19272
commit
2e8e1d8c40
2 changed files with 20 additions and 2 deletions
|
@ -55,6 +55,7 @@ public class Browser {
|
|||
private static CustomTabsServiceConnection customTabsServiceConnection;
|
||||
private static String customTabsPackageToBind;
|
||||
private static WeakReference<Activity> currentCustomTabsActivity;
|
||||
private static Boolean isDisplayedProgressDialog = false;
|
||||
|
||||
private static CustomTabsSession getCurrentSession() {
|
||||
return customTabsCurrentSession == null ? null : customTabsCurrentSession.get();
|
||||
|
@ -194,6 +195,7 @@ public class Browser {
|
|||
final int reqId = ConnectionsManager.getInstance(UserConfig.selectedAccount).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
|
||||
try {
|
||||
progressDialog[0].dismiss();
|
||||
isDisplayedProgressDialog = false;
|
||||
} catch (Throwable ignore) {
|
||||
|
||||
}
|
||||
|
@ -212,12 +214,16 @@ public class Browser {
|
|||
}
|
||||
}));
|
||||
AndroidUtilities.runOnUIThread(() -> {
|
||||
if (progressDialog[0] == null) {
|
||||
if (progressDialog[0] == null || isDisplayedProgressDialog) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
progressDialog[0].setOnCancelListener(dialog -> ConnectionsManager.getInstance(UserConfig.selectedAccount).cancelRequest(reqId, true));
|
||||
progressDialog[0].setOnCancelListener(dialog -> {
|
||||
ConnectionsManager.getInstance(UserConfig.selectedAccount).cancelRequest(reqId, true);
|
||||
isDisplayedProgressDialog = false;
|
||||
});
|
||||
progressDialog[0].show();
|
||||
isDisplayedProgressDialog = true;
|
||||
} catch (Exception ignore) {
|
||||
|
||||
}
|
||||
|
|
12
readme bugs.txt
Normal file
12
readme bugs.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
========== commit: multiple_dialogs ============
|
||||
precondition
|
||||
- The user has lost Internet access or is turned off
|
||||
- The app is open
|
||||
test case
|
||||
- Open the "burger" menu
|
||||
- Repeatedly click on the item Telegram FAQ
|
||||
actual res.
|
||||
- Opens multiple AlertDialog with type 3
|
||||
- And each of the open dialogs needs to be removed in turn
|
||||
expected res.
|
||||
- When executing a request, a single ProgressDialog opens
|
Loading…
Add table
Reference in a new issue