mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 00:02:27 -08:00
Serializable for Pw, solve bug of entry refresh
This commit is contained in:
1 parent
d788d16020
commit
795d6fa334
14 files changed
+78
-40
No files matched your search
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.support.v7.util.SortedList;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.util.SortedListAdapterCallback;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@@ -58,6 +59,14 @@ public class NodeAdapter extends RecyclerView.Adapter<BasicViewHolder> {
|
||||
nodeSortedList.add(node);
|
||||
}
|
||||
|
||||
public void updateNode(PwNode node) {
|
||||
try {
|
||||
nodeSortedList.updateItemAt(nodeSortedList.indexOf(node), node);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
Log.e(NodeAdapter.class.getName(), e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void removeNode(PwNode node) {
|
||||
nodeSortedList.remove(node);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user