mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Update contact list when contacts are deleted. #227
Also removed unnecessary adapter notifications in various places.
This commit is contained in:
@@ -111,7 +111,6 @@ implements EventListener, OnItemClickListener {
|
||||
for (ForumContacts f : available)
|
||||
adapter.add(new AvailableForumsItem(f));
|
||||
adapter.sort(AvailableForumsItemComparator.INSTANCE);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -220,7 +220,6 @@ public class ForumActivity extends BriarActivity implements EventListener,
|
||||
// Scroll to the bottom
|
||||
list.setSelection(adapter.getCount() - 1);
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -180,7 +180,6 @@ public class ForumListActivity extends BriarActivity
|
||||
available.setVisibility(GONE);
|
||||
loading.setVisibility(VISIBLE);
|
||||
adapter.clear();
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -197,7 +196,6 @@ public class ForumListActivity extends BriarActivity
|
||||
// Add a new item
|
||||
adapter.add(new ForumListItem(f, headers));
|
||||
adapter.sort(ForumListItemComparator.INSTANCE);
|
||||
adapter.notifyDataSetChanged();
|
||||
selectFirstUnread();
|
||||
}
|
||||
});
|
||||
@@ -298,7 +296,6 @@ public class ForumListActivity extends BriarActivity
|
||||
ForumListItem item = findForum(g);
|
||||
if (item != null) {
|
||||
adapter.remove(item);
|
||||
adapter.notifyDataSetChanged();
|
||||
if (adapter.isEmpty()) {
|
||||
empty.setVisibility(VISIBLE);
|
||||
list.setVisibility(GONE);
|
||||
|
||||
@@ -192,7 +192,6 @@ implements OnItemSelectedListener, OnClickListener {
|
||||
for (LocalAuthor a : localAuthors)
|
||||
adapter.add(new LocalAuthorItem(a));
|
||||
adapter.sort(LocalAuthorItemComparator.INSTANCE);
|
||||
adapter.notifyDataSetChanged();
|
||||
int count = adapter.getCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
LocalAuthorItem item = adapter.getItem(i);
|
||||
|
||||
Reference in New Issue
Block a user