Show the last created tab after initialization

This commit is contained in:
Anthony Restaino 2016-02-01 22:38:40 -05:00
parent de4fdc86e0
commit 84627b3fae
2 changed files with 10 additions and 1 deletions

View File

@ -367,7 +367,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
@Override
public void onComplete() {
// At this point we always have at least a tab in the tab manager
showTab(0);
showTab(mTabsManager.last());
mProxyUtils.checkForProxy(BrowserActivity.this);
}

View File

@ -214,6 +214,15 @@ public class TabsManager {
return mTabList.size();
}
/**
* The index of the last tab in the manager.
*
* @return the last tab in the list or -1 if there are no tabs.
*/
public synchronized int last() {
return mTabList.size() - 1;
}
/**
* Create and return a new tab. The tab is
* automatically added to the tabs list.