mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-20 06:47:06 -04:00
[app] don't auto-show install dialog
the current code is too complex and fragile to do this in a safe fashion without causing multiple stacked install dialogs on top of each other.
This commit is contained in:
@@ -454,6 +454,11 @@ public class AppDetailsActivity extends AppCompatActivity
|
||||
// clear progress if the state got removed in the meantime (e.g. download canceled)
|
||||
adapter.clearProgress();
|
||||
}
|
||||
if (this.currentStatus == newStatus) {
|
||||
Utils.debugLog(TAG, "Same app status, not updating.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentStatus = newStatus;
|
||||
if (this.currentStatus == null) {
|
||||
return;
|
||||
@@ -477,15 +482,6 @@ public class AppDetailsActivity extends AppCompatActivity
|
||||
localBroadcastManager.registerReceiver(installReceiver,
|
||||
Installer.getInstallIntentFilter(newStatus.getCanonicalUrl()));
|
||||
} else {
|
||||
try {
|
||||
if (newStatus.intent != null) {
|
||||
localBroadcastManager.registerReceiver(installReceiver,
|
||||
Installer.getInstallIntentFilter(newStatus.getCanonicalUrl()));
|
||||
newStatus.intent.send();
|
||||
}
|
||||
} catch (PendingIntent.CanceledException e) {
|
||||
Log.e(TAG, "PI canceled", e);
|
||||
}
|
||||
adapter.clearProgress();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user