Commit cf871265 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Mark Translate Message as high priority after a Translate

This change caters to users that have a tendency to toggle between
a different language and the original language of a page.

Bug: 1014959, 1042410
Change-Id: I718124ce7791762f7311e511e2cac6d5d7d5a671
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003252
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Auto-Submit: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732395}
parent 69a65a3a
...@@ -128,6 +128,13 @@ NSString* const kTranslateNotificationSnackbarCategory = ...@@ -128,6 +128,13 @@ NSString* const kTranslateNotificationSnackbarCategory =
break; break;
case translate::TranslateStep::TRANSLATE_STEP_AFTER_TRANSLATE: { case translate::TranslateStep::TRANSLATE_STEP_AFTER_TRANSLATE: {
self.displayShowOriginalBanner = YES; self.displayShowOriginalBanner = YES;
// Once the user asks for the page to be translated once, always make the
// banner presentation high priority even if the user requests to show the
// original language, since there is a possibility the user will be
// toggling between languages. In addition, reverting an infobar does not
// show the "Translate?" banner, so every subsequent banner presentation
// will be a "Show Original" one.
self.highPriorityPresentation = YES;
[self.badgeDelegate infobarWasAccepted:self.infobarType [self.badgeDelegate infobarWasAccepted:self.infobarType
forWebState:self.webState]; forWebState:self.webState];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment