Commit 3eec7d08 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Update TabGrid's activePage when closing last incognito tab

When closing the last incognito tab, the incognito page is no longer
the active page. It should be updated.

Bug: 1011054
Change-Id: If2df5c8398bbc13ea533652296dbf124a63d650c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872158
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707896}
parent a7e224e1
...@@ -1118,6 +1118,7 @@ NSUInteger GetPageIndexFromPage(TabGridPage page) { ...@@ -1118,6 +1118,7 @@ NSUInteger GetPageIndexFromPage(TabGridPage page) {
// the incognito tabs. // the incognito tabs.
if (count == 0 && self.currentPage == TabGridPageIncognitoTabs) { if (count == 0 && self.currentPage == TabGridPageIncognitoTabs) {
// Show the regular tabs to the user if the last incognito tab is closed. // Show the regular tabs to the user if the last incognito tab is closed.
self.activePage = TabGridPageRegularTabs;
if (self.viewLoaded && self.view.window) { if (self.viewLoaded && self.view.window) {
// Visibly scroll to the regular tabs panel after a slight delay when // Visibly scroll to the regular tabs panel after a slight delay when
// the user is already in the tab switcher. // the user is already in the tab switcher.
......
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