mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
Bug 837815 Reading list button opens Top Sites, not Reading List, r=wesj
This commit is contained in:
parent
e662fa3f8e
commit
3c0206eb79
@ -272,7 +272,7 @@ public class AwesomeBar extends GeckoActivity {
|
|||||||
if (showReadingList) {
|
if (showReadingList) {
|
||||||
BookmarksTab bookmarksTab = mAwesomeTabs.getBookmarksTab();
|
BookmarksTab bookmarksTab = mAwesomeTabs.getBookmarksTab();
|
||||||
bookmarksTab.setShowReadingList(true);
|
bookmarksTab.setShowReadingList(true);
|
||||||
mAwesomeTabs.setCurrentTabByTag(bookmarksTab.getTag());
|
mAwesomeTabs.setCurrentItemByTag(bookmarksTab.getTag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public class AwesomeBarTabs extends TabHost
|
|||||||
|
|
||||||
styleSelectedTab();
|
styleSelectedTab();
|
||||||
|
|
||||||
// Initialize "App Pages" list with no filter
|
// Initialize "All Pages" list with no filter
|
||||||
filter("");
|
filter("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +199,15 @@ public class AwesomeBarTabs extends TabHost
|
|||||||
styleSelectedTab();
|
styleSelectedTab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCurrentItemByTag(String tag) {
|
||||||
|
for (int i = 0; i < mTabs.length; i++) {
|
||||||
|
if (tag.equals(mTabs[i].getTag())) {
|
||||||
|
mViewPager.setCurrentItem(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void styleSelectedTab() {
|
private void styleSelectedTab() {
|
||||||
int selIndex = mViewPager.getCurrentItem();
|
int selIndex = mViewPager.getCurrentItem();
|
||||||
TabWidget tabWidget = getTabWidget();
|
TabWidget tabWidget = getTabWidget();
|
||||||
|
Loading…
Reference in New Issue
Block a user