mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-22 07:50:19 -04:00
Remove "InstallError" entries when clearing notification
I.e. either the user "swiped" the notification away or clicked on it to view the error message (and thus the notification was auto canceled)
This commit is contained in:
@@ -87,10 +87,15 @@ class NotificationHelper {
|
||||
appUpdateStatusManager.clearAllInstalled();
|
||||
break;
|
||||
case BROADCAST_NOTIFICATIONS_UPDATE_CLEARED:
|
||||
// If clearing apps in state "InstallError" (like when auto-cancelling) we
|
||||
// remove them from the status manager entirely.
|
||||
AppUpdateStatusManager.AppUpdateStatus appUpdateStatus = appUpdateStatusManager.get(intent.getStringExtra(EXTRA_NOTIFICATION_KEY));
|
||||
if (appUpdateStatus != null && appUpdateStatus.status == AppUpdateStatusManager.Status.InstallError) {
|
||||
appUpdateStatusManager.removeApk(intent.getStringExtra(EXTRA_NOTIFICATION_KEY));
|
||||
}
|
||||
break;
|
||||
case BROADCAST_NOTIFICATIONS_INSTALLED_CLEARED:
|
||||
String key = intent.getStringExtra(EXTRA_NOTIFICATION_KEY);
|
||||
appUpdateStatusManager.removeApk(key);
|
||||
appUpdateStatusManager.removeApk(intent.getStringExtra(EXTRA_NOTIFICATION_KEY));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user