зеркало из https://github.com/mozilla/gecko-dev.git
Bug 996850 - Part 1: Don't show context menu for empty sites. r=lucasr
This commit is contained in:
Родитель
0783da2ec6
Коммит
cf76b4008d
|
@ -107,6 +107,13 @@ public class TopSitesGridItemView extends RelativeLayout {
|
|||
return mIsPinned;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true, if this view has no content to show.
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
return mIsEmpty;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title The title for this view.
|
||||
*/
|
||||
|
|
|
@ -125,7 +125,8 @@ public class TopSitesGridView extends GridView {
|
|||
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Cursor cursor = (Cursor) parent.getItemAtPosition(position);
|
||||
|
||||
if (cursor == null) {
|
||||
TopSitesGridItemView gridView = (TopSitesGridItemView) view;
|
||||
if (cursor == null || gridView.isEmpty()) {
|
||||
mContextMenuInfo = null;
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче