mirror of
https://github.com/m2049r/xmrwallet
synced 2025-05-17 05:11:54 +02:00
adjust areContentsTheSame criteria
This commit is contained in:
parent
77e9bf7c43
commit
3329636d32
app/src/main/java/com/m2049r/xmrwallet
@ -227,8 +227,7 @@ public class NodeInfo extends Node {
|
|||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
ResponseBody respBody = response.body(); // closed through Response object
|
ResponseBody respBody = response.body(); // closed through Response object
|
||||||
if ((respBody != null) && (respBody.contentLength() < 2000)) { // sanity check
|
if ((respBody != null) && (respBody.contentLength() < 2000)) { // sanity check
|
||||||
final JSONObject json = new JSONObject(
|
final JSONObject json = new JSONObject(respBody.string());
|
||||||
respBody.string());
|
|
||||||
String rpcVersion = json.getString("jsonrpc");
|
String rpcVersion = json.getString("jsonrpc");
|
||||||
if (!RPC_VERSION.equals(rpcVersion))
|
if (!RPC_VERSION.equals(rpcVersion))
|
||||||
return false;
|
return false;
|
||||||
|
@ -77,8 +77,14 @@ public class NodeInfoAdapter extends RecyclerView.Adapter<NodeInfoAdapter.ViewHo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
||||||
return mOldList.get(oldItemPosition).toNodeString().equals(mNewList.get(newItemPosition).toNodeString())
|
final NodeInfo oldItem = mOldList.get(oldItemPosition);
|
||||||
&& (mOldList.get(oldItemPosition).isSelected() == mNewList.get(newItemPosition).isSelected());
|
final NodeInfo newItem = mNewList.get(newItemPosition);
|
||||||
|
return (oldItem.getTimestamp() == newItem.getTimestamp())
|
||||||
|
&& (oldItem.isTested() == newItem.isTested())
|
||||||
|
&& (oldItem.isValid() == newItem.isValid())
|
||||||
|
&& (oldItem.getResponseTime() == newItem.getResponseTime())
|
||||||
|
&& (oldItem.isSelected() == newItem.isSelected())
|
||||||
|
&& (oldItem.getName().equals(newItem.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user