Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tooltips to show at the page load (uplift to 1.20.x) #7875

Merged
merged 1 commit into from
Feb 9, 2021
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 @@ -124,8 +124,6 @@ public abstract class BraveToolbarLayout extends ToolbarLayout
public static final String PREF_HIDE_BRAVE_REWARDS_ICON = "hide_brave_rewards_icon";
private static final String JAPAN_COUNTRY_CODE = "JP";

private boolean shouldShowHttpsUpgradeToolitip;

private static final long MB_10 = 10000000;
private static final long MINUTES_10 = 10 * 60 * 1000;

Expand Down Expand Up @@ -248,9 +246,6 @@ public void blockEvent(int tabId, String block_type, String subresource) {
.RESOURCE_IDENTIFIER_TRACKERS))) {
addStatsToDb(block_type, subresource, currentTab.getUrlString());
}
if (mBraveShieldsButton != null && mBraveShieldsHandler != null
&& !mBraveShieldsHandler.isShowing())
checkForTooltip(currentTab);
}

@Override
Expand Down Expand Up @@ -357,9 +352,9 @@ public void onPageLoadFinished(final Tab tab, String url) {
getContext(), RetentionNotificationUtil.BRAVE_STATS_TIME);
OnboardingPrefManager.getInstance().setTimeSavedNotificationStarted(true);
}
if (shouldShowHttpsUpgradeToolitip) {
showTooltip(ShieldsTooltipEnum.HTTPS_UPGRADE_TOOLTIP);
shouldShowHttpsUpgradeToolitip = false;
if (mBraveShieldsButton != null && mBraveShieldsHandler != null
&& !mBraveShieldsHandler.isShowing()) {
checkForTooltip(tab);
}
}
}
Expand Down Expand Up @@ -429,7 +424,7 @@ && shouldShowVideoTooltip(tab.getUrlString())) {
} else if (!BraveShieldsUtils.hasShieldsTooltipShown(
BraveShieldsUtils.PREF_SHIELDS_HTTPS_UPGRADE_TOOLTIP)
&& mBraveShieldsHandler.getHttpsUpgradeCount(tab.getId()) > 0) {
shouldShowHttpsUpgradeToolitip = true;
showTooltip(ShieldsTooltipEnum.HTTPS_UPGRADE_TOOLTIP);
BraveShieldsUtils.setShieldsTooltipShown(
BraveShieldsUtils.PREF_SHIELDS_HTTPS_UPGRADE_TOOLTIP, true);
}
Expand Down