Commit 4e4dd2f5 authored by Yusuke Iwaki's avatar Yusuke Iwaki

FIX #74 Merge branch 'fix_issue_dup_connect2' into develop

parents 42fb1f71 e0594aa4
...@@ -31,10 +31,17 @@ public class RealmListObserver<T extends RealmObject> extends AbstractRealmResul ...@@ -31,10 +31,17 @@ public class RealmListObserver<T extends RealmObject> extends AbstractRealmResul
return query.queryItems(realm); return query.queryItems(realm);
} }
private String previousResultsString;
@Override public final RealmChangeListener<RealmResults<T>> getListener() { @Override public final RealmChangeListener<RealmResults<T>> getListener() {
return element -> { return results -> {
String currentResultString = results != null ? results.toString() : null;
if (previousResultsString != null && previousResultsString.equals(currentResultString)) {
return;
}
previousResultsString = currentResultString;
if (onUpdateListener != null) { if (onUpdateListener != null) {
onUpdateListener.onUpdateResults(element); onUpdateListener.onUpdateResults(results);
} }
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment