mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917944 - Remove "Most recent" header in history page, r=margaret
This commit is contained in:
parent
5b8ad1210c
commit
d5d290983f
@ -48,9 +48,6 @@ public class MostRecentPage extends HomeFragment {
|
|||||||
// The view shown by the fragment.
|
// The view shown by the fragment.
|
||||||
private ListView mList;
|
private ListView mList;
|
||||||
|
|
||||||
// The title for this HomeFragment page.
|
|
||||||
private TextView mTitle;
|
|
||||||
|
|
||||||
// Reference to the View to display when there are no results.
|
// Reference to the View to display when there are no results.
|
||||||
private View mEmptyView;
|
private View mEmptyView;
|
||||||
|
|
||||||
@ -93,11 +90,6 @@ public class MostRecentPage extends HomeFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
mTitle = (TextView) view.findViewById(R.id.title);
|
|
||||||
if (mTitle != null) {
|
|
||||||
mTitle.setText(R.string.home_most_recent_title);
|
|
||||||
}
|
|
||||||
|
|
||||||
mList = (ListView) view.findViewById(R.id.list);
|
mList = (ListView) view.findViewById(R.id.list);
|
||||||
mList.setTag(HomePager.LIST_TAG_MOST_RECENT);
|
mList.setTag(HomePager.LIST_TAG_MOST_RECENT);
|
||||||
|
|
||||||
@ -120,7 +112,6 @@ public class MostRecentPage extends HomeFragment {
|
|||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
mList = null;
|
mList = null;
|
||||||
mTitle = null;
|
|
||||||
mEmptyView = null;
|
mEmptyView = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,18 +150,10 @@ public class MostRecentPage extends HomeFragment {
|
|||||||
|
|
||||||
private void updateUiFromCursor(Cursor c) {
|
private void updateUiFromCursor(Cursor c) {
|
||||||
if (c != null && c.getCount() > 0) {
|
if (c != null && c.getCount() > 0) {
|
||||||
if (mTitle != null) {
|
|
||||||
mTitle.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cursor is empty, so hide the title and set the
|
// Cursor is empty, so set the empty view if it hasn't been set already.
|
||||||
// empty view if it hasn't been set already.
|
|
||||||
if (mTitle != null) {
|
|
||||||
mTitle.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mEmptyView == null) {
|
if (mEmptyView == null) {
|
||||||
// Set empty page view. We delay this so that the empty view won't flash.
|
// Set empty page view. We delay this so that the empty view won't flash.
|
||||||
final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.id.home_empty_view_stub);
|
final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.id.home_empty_view_stub);
|
||||||
|
@ -215,7 +215,8 @@ abstract class AboutHomeTest extends BaseTest {
|
|||||||
switch (tab) {
|
switch (tab) {
|
||||||
case MOST_RECENT: {
|
case MOST_RECENT: {
|
||||||
mSolo.clickOnView(tabwidget.getChildAt(0));
|
mSolo.clickOnView(tabwidget.getChildAt(0));
|
||||||
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
|
||||||
|
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TABS_FROM_LAST_TIME: {
|
case TABS_FROM_LAST_TIME: {
|
||||||
@ -251,7 +252,8 @@ abstract class AboutHomeTest extends BaseTest {
|
|||||||
waitForAboutHomeTab(aboutHomeTabs.indexOf(StringHelper.HISTORY_LABEL));
|
waitForAboutHomeTab(aboutHomeTabs.indexOf(StringHelper.HISTORY_LABEL));
|
||||||
TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0);
|
TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0);
|
||||||
mSolo.clickOnView(tabwidget.getChildAt(0));
|
mSolo.clickOnView(tabwidget.getChildAt(0));
|
||||||
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
|
||||||
|
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TABS_FROM_LAST_TIME: {
|
case TABS_FROM_LAST_TIME: {
|
||||||
|
@ -93,7 +93,7 @@ class StringHelper {
|
|||||||
public static final String TOP_SITES_LABEL = "TOP SITES";
|
public static final String TOP_SITES_LABEL = "TOP SITES";
|
||||||
public static final String BOOKMARKS_LABEL = "BOOKMARKS";
|
public static final String BOOKMARKS_LABEL = "BOOKMARKS";
|
||||||
public static final String READING_LIST_LABEL = "READING LIST";
|
public static final String READING_LIST_LABEL = "READING LIST";
|
||||||
public static final String MOST_RECENT_LABEL = "Most recent";
|
public static final String TODAY_LABEL = "Today";
|
||||||
public static final String TABS_FROM_LAST_TIME_LABEL = "Open all tabs from last time";
|
public static final String TABS_FROM_LAST_TIME_LABEL = "Open all tabs from last time";
|
||||||
|
|
||||||
// Desktop default bookmarks folders
|
// Desktop default bookmarks folders
|
||||||
|
Loading…
Reference in New Issue
Block a user