mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-30 14:46:38 +00:00
use Loader when conversation is updated instead of requery
// FREEBIE
This commit is contained in:
@@ -65,7 +65,7 @@ public class ConversationAdapter extends CursorAdapter implements AbsListView.Re
|
||||
public ConversationAdapter(Context context, MasterSecret masterSecret,
|
||||
Handler failedIconClickHandler, boolean groupThread, boolean pushDestination)
|
||||
{
|
||||
super(context, null, true);
|
||||
super(context, null, 0);
|
||||
this.context = context;
|
||||
this.masterSecret = masterSecret;
|
||||
this.failedIconClickHandler = failedIconClickHandler;
|
||||
@@ -84,6 +84,12 @@ public class ConversationAdapter extends CursorAdapter implements AbsListView.Re
|
||||
item.set(masterSecret, messageRecord, failedIconClickHandler, groupThread, pushDestination);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCursor(Cursor cursor) {
|
||||
messageRecordCache.clear();
|
||||
super.changeCursor(cursor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
View view;
|
||||
@@ -148,12 +154,6 @@ public class ConversationAdapter extends CursorAdapter implements AbsListView.Re
|
||||
return messageRecord;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onContentChanged() {
|
||||
super.onContentChanged();
|
||||
messageRecordCache.clear();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
this.getCursor().close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user