mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Use start/stop lifecycle callbacks rather than pause/resume.
Also fixed a couple of bugs.
This commit is contained in:
@@ -75,6 +75,13 @@ public abstract class BriarAdapter<T, V extends ViewHolder>
|
||||
this.items.addAll(items);
|
||||
}
|
||||
|
||||
public void setItems(Collection<T> items) {
|
||||
this.items.beginBatchedUpdates();
|
||||
this.items.clear();
|
||||
this.items.addAll(items);
|
||||
this.items.endBatchedUpdates();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public T getItemAt(int position) {
|
||||
if (position == INVALID_POSITION || position >= items.size()) {
|
||||
|
||||
Reference in New Issue
Block a user