1
0
Fork 0

Closes #9529: changed styling for permissions dialog to set proper padding

- Changed the visibility check to check just for the permissions shown instead of all the permissions in WebsitePermissionsState
- Added bottom padding to the permissions root view so there is balanced padding on top and bottom
master
apoorv9990 2020-04-26 09:53:11 -07:00 committed by Emily Kager
parent b06be1fcde
commit 97704bfdbd
2 changed files with 8 additions and 2 deletions

View File

@ -55,7 +55,12 @@ class WebsitePermissionsView(
* @param state [WebsitePermissionsState] to be rendered.
*/
fun update(state: WebsitePermissionsState) {
if (state.isVisible) {
val isAnyPermissionVisible = state.camera.isVisible || state.location.isVisible ||
state.microphone.isVisible || state.notification.isVisible
// Can not use state.isVisible because we are not handling the audio permissions here right
// now. If we add more permissions below we should update isAnyPermissionVisible too
if (isAnyPermissionVisible) {
interactor.onPermissionsShown()
}

View File

@ -9,7 +9,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/permissions_view"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:id="@+id/cameraStatus"