title: Listview won't update from realm
body: <p>After I create or receive a message send the message then save it to realm. Afterwards I need to update my threads ListView on the threads page and bring the newest messages to the top. I already have it so the thread list shows the updated preview and updated date, but it stays in it's inital ListView position. I tried to requery realm to get all info and reorder by the lastUpdated time, but it doesn't seem to work. Do I need to wipe the old thread list then repopulate it to get it to update?</p>
  
  <p>I have the update triggered on the onResume()</p>
  
  <pre><code>    @Override
  protected void onResume() {
      super.onResume();
      updateListview = true;
      updateList();
  }
  </code></pre>
  
  <p>Here's my update</p>
  
  <pre><code>    @UiThread
  public void updateList() {
      try {
  
          if (updateListview) {
              thread_realm = Realm.getInstance(this);
              results = thread_realm.where(ZipListModel.class).findAllSorted("zipupdated", RealmResults.SORT_ORDER_DESCENDING);
              adapter = new ZipListAdapter(this, results);
              threadsListView.setAdapter(adapter);
  
              adapter.notifyDataSetChanged();
              if (results.size()==0){
                  createZipHint.setVisibility(View.VISIBLE);
              } else {
                  createZipHint.setVisibility(View.INVISIBLE);
              }
          }
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Adapter</p>
  
  <pre><code>package com.admin.zipline.adapters;
  
  import android.content.Context;
  import android.graphics.Color;
  import android.graphics.Typeface;
  import android.support.v7.widget.CardView;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  import com.admin.zipline.R;
  import com.admin.zipline.activities.ZipListPage;
  import com.admin.zipline.model.ZipListModel;
  
  import org.androidannotations.annotations.ViewById;
  
  import java.util.ArrayList;
  import java.util.Date;
  import java.util.List;
  
  
  public class ZipListAdapter extends ArrayAdapter&lt;ZipListModel&gt;
  
  
    {
      List&lt;ZipListModel&gt; items;
   Context context;
   Typeface semiBold;
   Typeface light;
   Typeface regular;
   String[] months={};
   public ZipListModel ziplist;
   ArrayList&lt;String&gt; ziplistNames,ziplistParticipantsaids;
   public ZipListAdapter(Context context, List&lt;ZipListModel&gt; threadslist) {
       super(context,R.layout.zip_adapter_view,threadslist);
      this.context = context;
      this.items=threadslist;
  }
  @Override
  public View getView(final int position, View view, ViewGroup parent) {
      ViewHolder holder ;
      if (view == null) {
          holder =new ViewHolder();
          LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          view = inflater.inflate(R.layout.zip_adapter_view, parent, false);
          light = Typeface.createFromAsset(context.getAssets(), "ProximaNova-Light.otf");
          regular = Typeface.createFromAsset(context.getAssets(), "ProximaNova-Regular.otf");
          semiBold = Typeface.createFromAsset(context.getAssets(),"ProximaNova-Semibold.otf");
          //TODO
          /*for showing the author image
          * */
          //holder.thread_image = (ImageView)view.findViewById(R.id.author_avatar);
          holder.thread_text = (TextView) view.findViewById(R.id.threadtext);
          holder.thread_name = (TextView) view.findViewById(R.id.threadname);
          holder.last_updated = (TextView) view.findViewById(R.id.lastupdated);
          holder.zip_members=(TextView)view.findViewById(R.id.ziplist_members);
          holder.thread_text.setTypeface(light);
          holder.thread_name.setTypeface(semiBold);
          holder.zip_members.setTypeface(regular);
          view.setTag(holder);
      }else{
          holder =(ViewHolder)view.getTag();
      }
      try{
          ziplist = items.get(position);
          ziplistNames = new ArrayList&lt;String&gt;();
          ziplistParticipantsaids=new ArrayList&lt;&gt;();
  
      if (ziplist != null) {
         if (ziplist.getMessagesListsmodel().first().getText()!=null){
             holder.thread_text.setText(ziplist.getMessagesListsmodel().first().getText());
         }
         if (ziplist.getMessagesListsmodel().first().getCreatedAt()!=null){
              holder.last_updated.setText(getDate(ziplist.getMessagesListsmodel().first().getCreatedAt()));
          }
  
  
          for (int i = 0; i &lt; ziplist.getParticipantsmodel().size(); i++) {
              ziplistNames.add(ziplist.getParticipantsmodel().get(i).getName());
              ziplistParticipantsaids.add(ziplist.getParticipantsmodel().get(i).getParticipantId());
          }
  
          String members="";
          for (int i=0;i&lt;ziplistNames.size();i++){
              members+=ziplist.getParticipantsmodel().get(i).getFirstName()+", ";
          }
         if (members.length() &gt; 3){
             members=members.substring(0,members.length()-2);
         }
  
          holder.zip_members.setText(members);
  
  
          if(ziplist.getZipname().isEmpty()){
              holder.thread_name.setText(members);
          } else {
              holder.thread_name.setText(ziplist.getZipname());
          }
      }
      }
      catch (Exception e){
          e.printStackTrace();
      }
   view.setBackgroundColor(Color.parseColor(ziplist.getZipColor()));
  
      return view;
  }
  String getDate(Date date) {
             try {
                  Date d = date;
                 months=context.getResources().getStringArray(R.array.months);
                 return months[d.getMonth()] + " " + (d.getDate());
             } catch (Exception e) {
                 e.printStackTrace();
                 return "";
      }
  }
  public class ViewHolder{
      ImageView thread_image;
      TextView thread_text,thread_name,last_updated,zip_members;
     // CardView cardView;
  }
  </code></pre>
  
  <p>}</p>