"Check updates" button will now show "Checking..." status only if it is really checking for updates

Since the button has to be disabled while app list is compiled, users
are confused by the "Checking..." status. The button will just show
ellipsis now while the app list is being built.
This commit is contained in:
Sergey Eremin
2017-08-29 17:41:19 +03:00
parent f71ddcc8a6
commit 09136efded
3 changed files with 11 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ class ForegroundUpdatableAppsTask extends UpdatableAppsTask {
super.onPreExecute();
Button button = activity.findViewById(R.id.check_updates);
button.setEnabled(false);
button.setText(R.string.details_download_checking);
button.setText(R.string.ellipsis);
}
@Override
@@ -69,6 +69,14 @@ class ForegroundUpdatableAppsTask extends UpdatableAppsTask {
button.setText(R.string.list_check_updates);
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
Button button = activity.findViewById(R.id.check_updates);
button.setEnabled(false);
button.setText(R.string.details_download_checking);
}
private App getSelf() {
if (installedApps.containsKey(BuildConfig.APPLICATION_ID)) {
return installedApps.get(BuildConfig.APPLICATION_ID);

View File

@@ -87,6 +87,7 @@ public class UpdatableAppsTask extends GoogleApiAsyncTask {
installedApps = filterSystemApps(installedApps);
}
// Requesting info from Google Play Market for installed apps
publishProgress();
List<App> appsFromPlayStore = new ArrayList<>();
try {
appsFromPlayStore.addAll(getAppsFromPlayStore(filterBlacklistedApps(context, installedApps).keySet()));

View File

@@ -23,4 +23,5 @@
<string name="details_installs" translatable="false">"%1$s↓"</string>
<string name="details_rating" translatable="false">"%1$.1f★"</string>
<string name="details_rating_specific" translatable="false">"%1$d★ %2$d"</string>
<string name="ellipsis" translatable="false">"…"</string>
</resources>