Fixed id offset, minor changes.

This commit is contained in:
Tobias Erthal
2016-12-03 19:39:27 +01:00
committed by Dominik Schürmann
parent ca67c52aa0
commit 5cb9de01ad
4 changed files with 5 additions and 2 deletions

View File

@@ -179,6 +179,7 @@ public class SelectSignKeyIdListFragment extends RecyclerFragment<SelectSignKeyA
mApiDao.addAllowedKeyIdForApp(allowedKeysUri, masterKeyId);
mResult.putExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, masterKeyId);
Log.d(Constants.TAG, "allowedKeyId: " + masterKeyId);
Log.d(Constants.TAG, "allowedKeysUri: " + allowedKeysUri);
getActivity().setResult(Activity.RESULT_OK, mResult);

View File

@@ -40,10 +40,10 @@ public class SelectSignKeyAdapter extends KeyCursorAdapter<CursorAdapter.KeyCurs
@Override
public long getItemId(int pos) {
if(pos < (super.getItemCount() - 1)) {
if(pos < super.getItemCount()) {
return super.getItemId(pos);
} else {
return 0L;
return RecyclerView.NO_ID;
}
}

View File

@@ -14,6 +14,7 @@ public abstract class KeyCursorAdapter<C extends CursorAdapter.KeyCursor, VH ext
public KeyCursorAdapter(Context context, C cursor){
super(context, cursor, 0);
setHasStableIds(true);
}
public void setQuery(String query) {