File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
lib/src/main/java/at/bitfire/cert4android Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,17 @@ class UserDecisionRegistry private constructor(
5353 // User decision possible → remember request in pendingDecisions so that a later decision will be applied to this request
5454
5555 cont.invokeOnCancellation {
56+ val decisionsList = pendingDecisions[cert]
57+
5658 // remove from pending decisions on cancellation
5759 synchronized(pendingDecisions) {
58- pendingDecisions[cert] ?.remove(cont)
60+ decisionsList ?.remove(cont)
5961 }
6062
63+ // Remove decisions list if empty
64+ if (decisionsList?.isEmpty() == true )
65+ pendingDecisions.remove(cert)
66+
6167 val nm = NotificationUtils .createChannels(context)
6268 nm.cancel(CertUtils .getTag(cert), NotificationUtils .ID_CERT_DECISION )
6369 }
You can’t perform that action at this time.
0 commit comments