{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":827955299,"defaultBranch":"main","name":"accompanist","ownerLogin":"FelixZY","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-07-12T18:42:41.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/2656517?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1720811012.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"14b037e1bc489e7d331a8be0b41c26b0074e66de","ref":"refs/heads/fzy/1781/1","pushedAt":"2024-07-12T19:03:32.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"FelixZY","name":"Felix Zedén Yverås","path":"/FelixZY","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2656517?s=80&v=4"},"commit":{"message":"fix(gh-1781): check for `Denied(shouldShowRationale=false)` in `MutableMultiplePermissionsState.shouldShowRationale`\n\n`launchMultiplePermissionRequest` is typically called when\n`shouldShowRationale` returns true. However, what may not be as obvious\nis that `launchMultiplePermissionRequest` appears to result in a noop if\none or more permissions in `MutableMultiplePermissionsState` are\n`Denied(shouldShowRationale=false)`. This caused issues for us in some\ncode similar to this:\n\n```kotlin\nval permissions =\n rememberMultiplePermissionsState(\n listOf(\n ACCESS_FINE_LOCATION,\n ACCESS_BACKGROUND_LOCATION,\n )\n )\n\nwhen {\n // Granted\n permissions.allPermissionsGranted -> /* ... */,\n // Denied, but I can ask the user\n permissions.shouldShowRationale ->\n // UNEXPECTED: Does not trigger!\n permissions.launchMultiplePermissionRequest()\n // Denied and I may not ask the user.\n else -> /* ... */\n}\n```\n\nThe fix would seem to be to additionally make sure that there are no\npermissions with the `Denied(shouldShowRationale=false)` status before\nreturning a truthy value from `shouldShowRationale`.","shortMessageHtmlLink":"fix(googlegh-1781): check for Denied(shouldShowRationale=false) in …"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEfic7ZwA","startCursor":null,"endCursor":null}},"title":"Activity · FelixZY/accompanist"}