Merge branch 'fix-1203--unknown-loader-id' into 'master'

Correctly re-initialize loaders in updates screen.

Closes #1203

See merge request fdroid/fdroidclient!616
This commit is contained in:
Hans-Christoph Steiner 2017-12-01 11:00:23 +00:00
commit a2c436fd65

View File

@ -89,8 +89,7 @@ public class UpdatesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
.addDelegate(new UpdateableAppsHeader.Delegate(activity))
.addDelegate(new KnownVulnApp.Delegate(activity));
activity.getSupportLoaderManager().initLoader(LOADER_CAN_UPDATE, null, this);
activity.getSupportLoaderManager().initLoader(LOADER_KNOWN_VULN, null, this);
initLoaders();
}
/**
@ -298,7 +297,12 @@ public class UpdatesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
* We need to rerun our database query to get a list of apps to update.
*/
private void onUpdateableAppsChanged() {
activity.getSupportLoaderManager().initLoader(0, null, this);
initLoaders();
}
private void initLoaders() {
activity.getSupportLoaderManager().initLoader(LOADER_CAN_UPDATE, null, this);
activity.getSupportLoaderManager().initLoader(LOADER_KNOWN_VULN, null, this);
}
/**