mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-05-19 05:55:04 -04:00
Select F-Droid correctly during swap process. Fixes #141.
Bug in the code which decides which apps to select for swapping. Due to the way in which Adapters and ListViews work together to provide "header" and "footer" functionalities for lists, there is a mismatch between the index in our original adapter, and the actual index on the list. It is up to us to maintain this correctly, which was not done, hence the off by one error.
This commit is contained in:
@@ -198,7 +198,7 @@ public class SelectAppsFragment extends ThemeableListFragment
|
||||
Cursor c = ((Cursor) listView.getItemAtPosition(i + 1));
|
||||
String packageName = c.getString(c.getColumnIndex(InstalledAppProvider.DataColumns.APP_ID));
|
||||
if (TextUtils.equals(packageName, fdroid)) {
|
||||
listView.setItemChecked(i, true); // always include FDroid
|
||||
listView.setItemChecked(i + 1, true); // always include FDroid
|
||||
} else {
|
||||
for (String selected : FDroidApp.selectedApps) {
|
||||
if (TextUtils.equals(packageName, selected)) {
|
||||
|
||||
Reference in New Issue
Block a user