Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Changes RealmObject to RealmModel in RealmBasedRecyclerViewAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
thorbenprimke committed May 31, 2016
1 parent 47ead79 commit 2835a54
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* {@link RealmRecyclerView}.
*/
public abstract class RealmBasedRecyclerViewAdapter
<T extends RealmObject, VH extends RealmViewHolder>
<T extends RealmModel, VH extends RealmViewHolder>
extends RecyclerView.Adapter<RealmViewHolder> {

public class RowWrapper {
Expand Down Expand Up @@ -422,7 +422,7 @@ private void updateRowWrappers() {

final long headerIndex = realmResults.getTable().getColumnIndex(headerColumnName);
int i = 0;
for (RealmObject result : realmResults) {
for (RealmModel result : realmResults) {
String rawHeader = ((RealmObjectProxy) result)
.realmGet$proxyState().getRow$realm().getString(headerIndex);
String header = createHeaderFromColumnValue(rawHeader);
Expand Down Expand Up @@ -576,8 +576,7 @@ public void removeFooter() {
public void onItemSwipedDismiss(int position) {
final BaseRealm realm = realmResults.realm;
realm.beginTransaction();
realmResults.get(position).deleteFromRealm();
realmResults.deleteFromRealm(position);
realm.commitTransaction();
}
}

0 comments on commit 2835a54

Please sign in to comment.