From 0174b4ca00dddbf0363cb9fc799b5af6b8c3bc5a Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Sun, 12 Apr 2015 10:48:02 +1000 Subject: [PATCH] Don't show empty list message until cursor finishes loading. Also forceably hid the "update all" button in the update tab. This is because on my crapy LG Tracphone android-10 device, it is slow enough that I can see that button appear and then disappear. --- F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java | 5 +++++ .../fdroid/fdroid/views/fragments/CanUpdateAppsFragment.java | 1 + 2 files changed, 6 insertions(+) diff --git a/F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java b/F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java index bff754979..fe1df03c2 100644 --- a/F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java +++ b/F-Droid/src/org/fdroid/fdroid/views/AppListAdapter.java @@ -31,6 +31,11 @@ abstract public class AppListAdapter extends CursorAdapter { init(context); } + @Override + public boolean isEmpty() { + return mDataValid && super.isEmpty(); + } + public AppListAdapter(Context context, Cursor c, boolean autoRequery) { super(context, c, autoRequery); init(context); diff --git a/F-Droid/src/org/fdroid/fdroid/views/fragments/CanUpdateAppsFragment.java b/F-Droid/src/org/fdroid/fdroid/views/fragments/CanUpdateAppsFragment.java index de3cdf05c..fa155c5eb 100644 --- a/F-Droid/src/org/fdroid/fdroid/views/fragments/CanUpdateAppsFragment.java +++ b/F-Droid/src/org/fdroid/fdroid/views/fragments/CanUpdateAppsFragment.java @@ -139,6 +139,7 @@ public class CanUpdateAppsFragment extends AppListFragment { mUpdateAllButton.setText(R.string.update_all); mUpdateAllButton.setCompoundDrawablesWithIntrinsicBounds( getResources().getDrawable(R.drawable.ic_menu_refresh), null, null, null); + mUpdateAllButton.setVisibility(View.GONE); linearLayout.addView(mUpdateAllButton, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));