[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/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
pull/600/head
apoorv9990 4 years ago committed by Emily Kager
parent 14dca9ab2a
commit d771f5ae43

@ -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()
}

@ -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"

Loading…
Cancel
Save