mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 997660 - Remove unnecessary cursor checks in bindView (r=wesj)
This commit is contained in:
parent
c32ed8166f
commit
76dc2f2b56
@ -511,18 +511,10 @@ public class TopSitesPanel extends HomeFragment {
|
||||
|
||||
@Override
|
||||
public void bindView(View bindView, Context context, Cursor cursor) {
|
||||
String url = "";
|
||||
String title = "";
|
||||
boolean pinned = false;
|
||||
|
||||
// Cursor is already moved to required position.
|
||||
if (!cursor.isAfterLast()) {
|
||||
url = cursor.getString(cursor.getColumnIndexOrThrow(TopSites.URL));
|
||||
title = cursor.getString(cursor.getColumnIndexOrThrow(TopSites.TITLE));
|
||||
|
||||
int type = cursor.getInt(cursor.getColumnIndexOrThrow(TopSites.TYPE));
|
||||
pinned = (type == TopSites.TYPE_PINNED);
|
||||
}
|
||||
final String url = cursor.getString(cursor.getColumnIndexOrThrow(TopSites.URL));
|
||||
final String title = cursor.getString(cursor.getColumnIndexOrThrow(TopSites.TITLE));
|
||||
final int type = cursor.getInt(cursor.getColumnIndexOrThrow(TopSites.TYPE));
|
||||
final boolean pinned = (type == TopSites.TYPE_PINNED);
|
||||
|
||||
final TopSitesGridItemView view = (TopSitesGridItemView) bindView;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user