fix clearing all permissions on login

This commit is contained in:
greenart7c3
2023-12-01 06:16:25 -03:00
parent edb045ba7e
commit 437259a7ff
@@ -88,7 +88,14 @@ fun sendResult(
val activity = context.getAppCompatActivity()
if (packageName != null) {
if (intentData.type == SignerType.GET_PUBLIC_KEY) {
account.savedApps.clear()
val keysToClear = account.savedApps.filter {
it.key.startsWith(packageName)
}.map {
it.key
}
keysToClear.forEach {
account.savedApps.remove(it)
}
}
permissions?.filter { it.checked }?.forEach {
val type = it.type.toUpperCase(Locale.current)