Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fixes #3176 Fixes #3116 Show/Hide the permission bubble in the correct position #3178

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ public void onURLSelectionAction(EditText aURLEdit, float centerX, SelectionActi

@Override
public void onPopUpButtonClicked() {
toggleQuickPermission(mBinding.navigationBarNavigation.urlBar.getWebXRButton(),
toggleQuickPermission(mBinding.navigationBarNavigation.urlBar.getPopUpButton(),
SitePermission.SITE_PERMISSION_POPUP,
!mViewModel.getIsPopUpBlocked().getValue().get());
}
Expand All @@ -994,7 +994,7 @@ public void onTrackingButtonClicked() {

@Override
public void onDrmButtonClicked() {
toggleQuickPermission(mBinding.navigationBarNavigation.urlBar.getTrackingButton(),
toggleQuickPermission(mBinding.navigationBarNavigation.urlBar.getDrmButton(),
SitePermission.SITE_PERMISSION_DRM,
!SettingsStore.getInstance(getContext()).isDrmContentPlaybackEnabled());
}
Expand Down Expand Up @@ -1246,9 +1246,11 @@ private void toggleQuickPermission(UIButton target, @SitePermission.Category int
mQuickPermissionWidget = new QuickPermissionWidget(getContext());
}

if (mQuickPermissionWidget.isVisible() && mQuickPermissionWidget.getCategory() == aCategory) {
if (mQuickPermissionWidget.isVisible()) {
mQuickPermissionWidget.hide(KEEP_WIDGET);
return;
if (mQuickPermissionWidget.getCategory() == aCategory) {
return;
}
}

String uri = UrlUtils.getHost(mAttachedWindow.getSession().getCurrentUri());
Expand Down