fix wrong class being used

This commit is contained in:
Mohamed Zenadi 2017-07-29 15:29:32 +01:00 committed by Mohamed Zenadi
parent 958ea12a88
commit 0c09b42528
3 changed files with 5 additions and 7 deletions

View File

@ -3,7 +3,6 @@ package com.zeapo.pwdstore
import android.app.Activity import android.app.Activity
import android.app.FragmentManager import android.app.FragmentManager
import android.os.Bundle import android.os.Bundle
import android.os.PersistableBundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
@ -14,8 +13,8 @@ import com.zeapo.pwdstore.utils.PasswordRepository
class SelectFolderActivity : AppCompatActivity() { class SelectFolderActivity : AppCompatActivity() {
internal var passwordList: SelectFolderFragment? = null internal var passwordList: SelectFolderFragment? = null
override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState, persistentState) super.onCreate(savedInstanceState)
setContentView(R.layout.select_folder_layout) setContentView(R.layout.select_folder_layout)

View File

@ -11,7 +11,6 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import com.zeapo.pwdstore.crypto.PgpHandler;
import com.zeapo.pwdstore.utils.FolderRecyclerAdapter; import com.zeapo.pwdstore.utils.FolderRecyclerAdapter;
import com.zeapo.pwdstore.utils.PasswordItem; import com.zeapo.pwdstore.utils.PasswordItem;
import com.zeapo.pwdstore.utils.PasswordRepository; import com.zeapo.pwdstore.utils.PasswordRepository;
@ -55,7 +54,7 @@ public class SelectFolderFragment extends Fragment{
passListStack = new Stack<>(); passListStack = new Stack<>();
scrollPosition = new Stack<>(); scrollPosition = new Stack<>();
pathStack = new Stack<>(); pathStack = new Stack<>();
recyclerAdapter = new FolderRecyclerAdapter((PgpHandler) getActivity(), mListener, recyclerAdapter = new FolderRecyclerAdapter((SelectFolderActivity) getActivity(), mListener,
PasswordRepository.getPasswords(new File(path), PasswordRepository.getRepositoryDirectory(getActivity()))); PasswordRepository.getPasswords(new File(path), PasswordRepository.getRepositoryDirectory(getActivity())));
} }

View File

@ -3,8 +3,8 @@ package com.zeapo.pwdstore.utils;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.view.View; import android.view.View;
import com.zeapo.pwdstore.SelectFolderActivity;
import com.zeapo.pwdstore.SelectFolderFragment; import com.zeapo.pwdstore.SelectFolderFragment;
import com.zeapo.pwdstore.crypto.PgpHandler;
import java.util.ArrayList; import java.util.ArrayList;
@ -12,7 +12,7 @@ public class FolderRecyclerAdapter extends EntryRecyclerAdapter {
private final SelectFolderFragment.OnFragmentInteractionListener listener; private final SelectFolderFragment.OnFragmentInteractionListener listener;
// Provide a suitable constructor (depends on the kind of dataset) // Provide a suitable constructor (depends on the kind of dataset)
public FolderRecyclerAdapter(PgpHandler activity, SelectFolderFragment.OnFragmentInteractionListener listener, ArrayList<PasswordItem> values) { public FolderRecyclerAdapter(SelectFolderActivity activity, SelectFolderFragment.OnFragmentInteractionListener listener, ArrayList<PasswordItem> values) {
super(activity, values); super(activity, values);
this.listener = listener; this.listener = listener;
} }