Commit 71976373 authored by edchin's avatar edchin Committed by Commit Bot

[ios] On closing last incognito, return to regular tabs

Users were feeling like they were "trapped in incognito". This solution
returns the user to the regular tabs tab switcher when the last
incognito tab is closed. This behavior is similar to pre-bijou.

Bug: 891396
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ifa9ba23bcc4d0f6029dbff73e60acd42993e1272
Reviewed-on: https://chromium-review.googlesource.com/c/1259481Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596523}
parent 21962d78
......@@ -1232,7 +1232,14 @@ NSUInteger GetPageIndexFromPage(TabGridPage page) {
[self configureButtonsForActiveAndCurrentPage];
if (gridViewController == self.regularTabsViewController) {
self.topToolbar.pageControl.regularTabCount = count;
} else if (gridViewController == self.incognitoTabsViewController) {
if (count == 0) {
[self.topToolbar.pageControl setSelectedPage:TabGridPageRegularTabs
animated:YES];
[self setCurrentPage:TabGridPageRegularTabs animated:YES];
}
}
[self broadcastIncognitoContentVisibility];
}
......
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