Browse Source

Show the last created tab after initialization

master
Anthony Restaino 9 years ago
parent
commit
84627b3fae
  1. 2
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 9
      app/src/main/java/acr/browser/lightning/activity/TabsManager.java

2
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -367,7 +367,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -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);
}

9
app/src/main/java/acr/browser/lightning/activity/TabsManager.java

@ -214,6 +214,15 @@ public class TabsManager { @@ -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.

Loading…
Cancel
Save